Soenneker.Validators.IpAddresses.Ssrf
4.0.3
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Validators.IpAddresses.Ssrf --version 4.0.3
NuGet\Install-Package Soenneker.Validators.IpAddresses.Ssrf -Version 4.0.3
<PackageReference Include="Soenneker.Validators.IpAddresses.Ssrf" Version="4.0.3" />
<PackageVersion Include="Soenneker.Validators.IpAddresses.Ssrf" Version="4.0.3" />
<PackageReference Include="Soenneker.Validators.IpAddresses.Ssrf" />
paket add Soenneker.Validators.IpAddresses.Ssrf --version 4.0.3
#r "nuget: Soenneker.Validators.IpAddresses.Ssrf, 4.0.3"
#:package Soenneker.Validators.IpAddresses.Ssrf@4.0.3
#addin nuget:?package=Soenneker.Validators.IpAddresses.Ssrf&version=4.0.3
#tool nuget:?package=Soenneker.Validators.IpAddresses.Ssrf&version=4.0.3
Soenneker.Validators.IpAddresses.Ssrf
IP address validation for SSRF protection
Determines whether an IPv4 or IPv6 address is publicly routable. Private, loopback, link-local, carrier-grade NAT, documentation, benchmarking, multicast, reserved, IPv4-mapped IPv6, and other special-use destinations are handled conservatively.
Installation
dotnet add package Soenneker.Validators.IpAddresses.Ssrf
Usage
services.AddSsrfIpAddressValidatorAsSingleton();
ISsrfIpAddressValidator validator =
serviceProvider.GetRequiredService<ISsrfIpAddressValidator>();
bool isPublic = validator.Validate("8.8.8.8"); // true
bool isPrivate = validator.Validate("192.168.1.10"); // false
bool isLoopback = validator.Validate(IPAddress.Loopback); // false
Validate(string) accepts unambiguous IP address literals only and performs no
managed allocations. It does not resolve hostnames. Legacy abbreviated, octal, and
hexadecimal IPv4 forms are rejected.
For SSRF-safe HTTP requests, resolve every hostname and validate every returned
address at connection time. Revalidate redirects as well, so DNS rebinding cannot
bypass an earlier check.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Validators.Validator (>= 4.0.732)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Validators.IpAddresses.Ssrf:
| Package | Downloads |
|---|---|
|
Soenneker.Utils.HttpClientCache.Ssrf
SSRF-safe, DNS-rebinding-resistant HttpClient caching. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.21 | 207 | 9/24/2026 |
| 4.0.19 | 416 | 9/15/2026 |
| 4.0.18 | 92 | 9/15/2026 |
| 4.0.17 | 355 | 9/14/2026 |
| 4.0.16 | 132 | 9/14/2026 |
| 4.0.15 | 417 | 9/8/2026 |
| 4.0.14 | 235 | 9/4/2026 |
| 4.0.13 | 129 | 9/4/2026 |
| 4.0.12 | 179 | 8/31/2026 |
| 4.0.11 | 138 | 8/30/2026 |
| 4.0.10 | 163 | 8/30/2026 |
| 4.0.9 | 132 | 8/29/2026 |
| 4.0.8 | 116 | 8/29/2026 |
| 4.0.7 | 421 | 8/12/2026 |
| 4.0.6 | 297 | 8/1/2026 |
| 4.0.5 | 117 | 8/1/2026 |
| 4.0.4 | 152 | 8/1/2026 |
| 4.0.3 | 137 | 7/30/2026 |
| 4.0.2 | 143 | 7/28/2026 |
| 4.0.1 | 217 | 7/27/2026 |