Skip to content

NuGet package vulnerability checker

Free, no sign-up

Check any version of a NuGet package for known vulnerabilities without restoring it. See each CVE, its severity and the package version that fixes it.

The package ID as in the .csproj file: Newtonsoft.Json. Case does not matter.

One exact version, as in your lockfile. Not a range.

This tool asks the OSV API directly from your browser. It sends the NuGet package ID and the version you check, and nothing is sent to HardenKit.

How to use the NuGet package vulnerability checker

  1. Enter the package ID, such as Newtonsoft.Json.
  2. Enter the exact version from the project file or packages.lock.json.
  3. Press the button to ask OSV.
  4. Read the table, worst first, and update the reference to the “Fixed in” version or later.

About this tool

A .NET project references NuGet packages by ID and version: Newtonsoft.Json 12.0.3, System.Text.Json 8.0.0. Enter both here to see the known vulnerabilities that cover that version and the release that fixes each. It is a lookup for one package, useful before adding a reference or when someone asks whether a version you ship is affected.

Package IDs are not case-sensitive, so newtonsoft.json and Newtonsoft.Json are the same package. For the version, look at the PackageReference in the project file, at Directory.Packages.props when the solution uses central package management, or at packages.lock.json. dotnet list package --include-transitive shows the versions that were resolved, including packages you did not reference yourself.

The .NET SDK has its own check: NuGet audits packages during restore and reports warnings NU1901 to NU1904, and dotnet list package --vulnerable prints the same findings on demand. Both use the GitHub Advisory Database, which OSV carries as well. They need a project that restores. This page needs a package ID and a version, and nothing else.

Sources

Questions

How is this different from dotnet list package --vulnerable?

That command restores a project and reports every vulnerable package in it. This checker answers for a single package version and needs no SDK or project. The advisories behind both come from the GitHub Advisory Database.

What are warnings NU1901 to NU1904?

They are the warnings NuGet raises during restore for packages with known vulnerabilities: NU1901 for low severity, NU1902 for moderate, NU1903 for high and NU1904 for critical. Look the package up here to see the advisories and the fixed version.

How do I find transitive package versions?

Run dotnet list package --include-transitive in the project folder. It lists the packages your references bring in and the version resolved for each. Those are the versions to check.

Does it cover the .NET runtime itself?

Only where the fix ships as a NuGet package, as with System.Text.Json or Microsoft.AspNetCore packages. Vulnerabilities fixed by updating the installed runtime or SDK are announced by Microsoft and are not package advisories.

Related tools