idunno.Security.Ssrf 5.3.0

Prefix Reserved
dotnet add package idunno.Security.Ssrf --version 5.3.0
                    
NuGet\Install-Package idunno.Security.Ssrf -Version 5.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="idunno.Security.Ssrf" Version="5.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="idunno.Security.Ssrf" Version="5.3.0" />
                    
Directory.Packages.props
<PackageReference Include="idunno.Security.Ssrf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add idunno.Security.Ssrf --version 5.3.0
                    
#r "nuget: idunno.Security.Ssrf, 5.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package idunno.Security.Ssrf@5.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=idunno.Security.Ssrf&version=5.3.0
                    
Install as a Cake Addin
#tool nuget:?package=idunno.Security.Ssrf&version=5.3.0
                    
Install as a Cake Tool

idunno.Security.Ssrf

A .NET library to help mitigate Server Side Request Forgery (SSRF) vulnerabilities in .NET applications that use HttpClient or ClientWebSocket.

Key Features

  • Mitigates common SSRF vulnerabilities in .NET applications that use HttpClient or ClientWebSocket.
  • Supports both IPv4 and IPv6 addresses.
  • Allows for extra IP ranges and addresses to be added to the default block list.

Getting Started

Add the idunno.Security.Ssrf package to your project, and then when you create an HttpClient and add an instance of the handler to the message handler pipeline.

using (var httpClient = new HttpClient(SsrfSocketsHttpHandlerFactory.Create()))
{
    _ = await httpClient.GetAsync(new Uri("bad.ssl.fail")).ConfigureAwait(false);
}

If you want to protect a ClientWebSocket you can pass a an instance of the handler in as the invoker parameter of ConnectAsync();.


using (var clientWebSocket = new ClientWebSocket())
using (var httpClient = new HttpClient(SsrfSocketsHttpHandlerFactory.Create()))
{
    await clientWebSocket.ConnectAsync(
        uri: new Uri("wss://echo.websocket.org"),
        invoker: httpClient);
}

If the SSRF handler encounters anything unsafe it will throw an SsrfException.

Please see the full README and the documentation for more details

The CHANGELOG has a full a list of changes in each version.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on idunno.Security.Ssrf:

Package Downloads
idunno.AtProto

.NET client for ATProto.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.3.0 99 5/9/2026
5.2.0 63 5/7/2026
5.1.0 110 5/1/2026
5.0.0 357 4/28/2026
4.0.0 617 4/14/2026
3.0.0 1,285 4/4/2026
2.0.0 107 3/31/2026
1.1.0 107 3/29/2026
1.0.0 100 3/29/2026