Soenneker.Validators.IpAddresses.Ssrf
4.0.5
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Validators.IpAddresses.Ssrf --version 4.0.5
NuGet\Install-Package Soenneker.Validators.IpAddresses.Ssrf -Version 4.0.5
<PackageReference Include="Soenneker.Validators.IpAddresses.Ssrf" Version="4.0.5" />
<PackageVersion Include="Soenneker.Validators.IpAddresses.Ssrf" Version="4.0.5" />
<PackageReference Include="Soenneker.Validators.IpAddresses.Ssrf" />
paket add Soenneker.Validators.IpAddresses.Ssrf --version 4.0.5
#r "nuget: Soenneker.Validators.IpAddresses.Ssrf, 4.0.5"
#:package Soenneker.Validators.IpAddresses.Ssrf@4.0.5
#addin nuget:?package=Soenneker.Validators.IpAddresses.Ssrf&version=4.0.5
#tool nuget:?package=Soenneker.Validators.IpAddresses.Ssrf&version=4.0.5
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.733)
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.34 | 158 | 10/14/2026 |
| 4.0.33 | 101 | 10/14/2026 |
| 4.0.32 | 74 | 10/14/2026 |
| 4.0.31 | 102 | 10/14/2026 |
| 4.0.25 | 107 | 10/13/2026 |
| 4.0.24 | 83 | 10/12/2026 |
| 4.0.23 | 261 | 10/11/2026 |
| 4.0.22 | 82 | 10/11/2026 |
| 4.0.21 | 655 | 9/24/2026 |
| 4.0.19 | 438 | 9/15/2026 |
| 4.0.18 | 105 | 9/15/2026 |
| 4.0.17 | 368 | 9/14/2026 |
| 4.0.16 | 141 | 9/14/2026 |
| 4.0.15 | 425 | 9/8/2026 |
| 4.0.14 | 250 | 9/4/2026 |
| 4.0.13 | 137 | 9/4/2026 |
| 4.0.12 | 190 | 8/31/2026 |
| 4.0.11 | 153 | 8/30/2026 |
| 4.0.10 | 175 | 8/30/2026 |
| 4.0.5 | 124 | 8/1/2026 |