Releases: blowdart/idunno.Security.Ssrf
v5.3.0
Changed
- Add verification to allowedHostnames to ensure they don't contain any IP literals, and throw an exception if they do.
- Fix IPv6 proxy detection to check for IPv6 literals in the proxy address, not just hostnames that resolve to IPv6 addresses.
- Add documentation warnings to configuration for allowedHostnames.
- Add a TOCTOU warning to
Ssrf.IsUnsafedocumentation.
v5.2.0
Added
- Add Azure WireServer IP range.
- Add AMT/Global-Unicast range.
- Add AS112 ranges.
- Add Deprecated Anycast Prefix for 6to4 Relay Routers.
- Add IPv6 discard/dummy range.
- Add Segment Routing (SRv6) SIDs range.
- Add tests for the specific ranges AntiSSRF uses.
Changed
- Stubbed the DNS resolver for mixed.ipv6.ssrf.fail tests because some corporate DNS servers can be flakey with that host, so the tests are now deterministic.
v5.1.0
v5.0.0
Added
- Add property and method extensions to
IPAddressto check for various special types of IPv6 addresses that may be relevant for SSRF protection, including:- Add check and normalization for IPv4-compatible IPv6 addresses,
IsIPv4CompatibleIPv6andMapIPv6CompatibleToIPv4(). - Add check and normalization for 6:4 IPv6 addresses,
Is6to4andMap6to4ToIPv4(). - Add check and normalization for ISATAP IPv6 addresses,
IsISATAPandMapISATAPToIPv4(). - Add check and normalization for NAT64 IPv6 addresses,
IsNAT64and mapMapNAT64ToIPv4(). - Add normalization for Teredo IPv6 addresses,
MapTeredoToIPv4().
- Add check and normalization for IPv4-compatible IPv6 addresses,
Changed
-
Breaking Replace
allowInsecureProtocolsparameter withallowedSchemesinSsrfSocketsHttpHandlerFactory.Create(),ProxiedSsrfDelegatingHandlerconstructor and as a property inSsrfOptionsto allow for more flexible protocol allow listing.To use the new collection replace
allowInsecureProtocols : truewithallowedSchemes : ["https", "http", "wss", "ws"].
You can removewssandwsif you have no WebSocket use. -
Breaking
ProxiedSsrfDelegatingHandlernow takes a new options class,ProxiedSsrfOptions, instead ofSsrfOptionsto allow for proxy specific configuration. The new options class inherits fromSsrfOptions
so all existing configuration options are still available, and theProxyproperty has been addedProxy- an instance ofWebProxythat will be used for the handler.
-
Breaking
ProxiedSsrfDelegatingHandlerconstructor now takes aWebProxyinstance rather than anIWebProxy
instance to allow the automatic safe listing of the proxy address. -
Update OTEL dependencies to address CVE-2026-40894 - OpenTelemetry dotnet: Excessive memory allocation when parsing OpenTelemetry propagation headers
v4.0.0
Added
- Add
allowedHostnamesparameter toSsrfSocketsHttpHandlerFactory.Create(),ProxiedSsrfDelegatingHandler
constructor and as a property inSsrfOptionsto enable safe listing of host names,
including support for wildcard patterns. (#6) (blowdart) (#7) (blowdart) (#9) (blowdart) (#10) (blowdart) - Add
safeIPNetworksandsafeIPAddressesparameters toSsrfSocketsHttpHandlerFactory.Create(),
ProxiedSsrfDelegatingHandlerconstructor and as properties inSsrfOptionsto enable safe listing of IP addresses and networks. (#6) (blowdart) (#8) (blowdart) (#9) (blowdart) (#10) (blowdart) - Add metrics for tracking SSRF attempts, including counts of blocked requests and counts for blocked hosts and IP addresses.
Changed
- Disable Nagle on new Sockets to match SocketsHttpHandler (#11) (MihaZupan)
- Breaking Remove multiple overloads in favor of two
Createmethods, with defaults, onSsrfSocketsHttpHandlerFactory. - Breaking Remove multiple constructors in favor of two constructors, with defaults, on
ProxiedSsrfDelegatingHandler. - Breaking Change casing of
additionalUnsafeIpAddressesparameter toadditionalUnsafeIPAddressesin constructors to match .NET's casing. - Breaking Change casing of
AdditionalUnsafeIpAddressesproperty toAdditionalUnsafeIPAddressesin SsrfOptions to match .NET's casing. - Breaking Change
additionalUnsafeNetworksparameter toadditionalUnsafeIPNetworksto match .NET's naming.
v3.0.0
Added
- Add
allowLoopbackparameter toSsrf.IsUnsafe,Ssrf.IsUnsafeHost,Ssrf.IsUnsafeIPAddressand
SsrfSocketsHttpHandlerFactory.Createmethods to allow localhost addresses to be considered valid
if explicitly specified. Fixes #4 - Add
ProxiedSsrfDelegatingHandlerto support the use of proxies.
Changed
- Breaking Remove
Proxyparameter fromSsrfSocketsHttpHandlerFactory.Createmethod.
To create a handler with a proxy useProxiedSsrfDelegatingHandler.