Skip to main content
LowSupply chainOWASP A05:2021CWE-540

How to fix: NuGet package manifest exposed

The response is a NuGet dependency manifest, served directly over HTTP. Either a packages.config with id and version attributes, or a packages.lock.json with resolved versions and content hashes.

Why it matters

The manifest lists every .NET package the application loads with its exact version, which is enough to look up known vulnerabilities without sending a single probe. packages.lock.json goes further and includes the full transitive graph plus the target framework moniker, which also reveals the .NET runtime version in use.

A reachable packages.config generally means the whole project directory is under the document root, so web.config, .csproj files and sometimes the App_Data directory are worth checking at the same paths. IIS blocks some of these by default through request filtering, but that protection is easy to lose when the site is served through a reverse proxy or a container image built by hand.

How to fix it

  1. 1Publish the built output (dotnet publish) rather than the project directory.
  2. 2Confirm IIS request filtering still denies .config and .csproj under the deployed path, especially behind a reverse proxy.
  3. 3Check the listed package versions against the GitHub Advisory Database.

Code examples

IIS: deny manifest files

XML
<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions>
          <add fileExtension=".config" allowed="false" />
          <add fileExtension=".csproj" allowed="false" />
        </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

Audit the resolved graph

bash
dotnet list package --vulnerable --include-transitive

References

Detected automatically by VulnRadar. The check id is supply-chain-nuget-manifest-exposed, stable across every scan so you can filter or diff on it.

See every supply chain check

Questions

How severe is NuGet package manifest exposed?
VulnRadar rates this low severity in the supply chain category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id supply-chain-nuget-manifest-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does NuGet package manifest exposed map to?
It maps to CWE-540. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for nuget package manifest exposed

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: NuGet package manifest exposed | VulnRadar