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

How to fix: Software bill of materials publicly served

The response is a software bill of materials in CycloneDX or SPDX format, listing the components the build shipped.

Why it matters

An SBOM is the most complete dependency inventory that exists for a build: every component, its exact version, and often its package URL and licence. Feeding it to an advisory-matching tool takes seconds and returns a precise list of known vulnerabilities present in what is currently deployed, with no probing of the application at all.

Publishing an SBOM is deliberate in some contexts and is increasingly expected in others, so this is informational rather than a defect. The point is to make the decision consciously: if it is intentional, the component list is public and the patching cadence has to assume an attacker reads it the day an advisory lands. If it reached the web root because the build copied its artifacts into the output, it is an accident worth undoing.

How to fix it

  1. 1Decide whether publishing this SBOM is intentional. If not, exclude build artifacts from the deployed output.
  2. 2If it is intentional, treat the component list as public and prioritise patching accordingly.
  3. 3Run the SBOM through a vulnerability matcher yourself, on a schedule, so you see what an attacker sees.

Code examples

Match the SBOM against advisories

bash
grype sbom:./sbom.cdx.json
# or
osv-scanner --sbom=./sbom.spdx.json

Keep build artifacts out of the deploy

bash
cat >> .vercelignore <<'EOF'
sbom.*.json
*.spdx.json
*.cdx.json
EOF

References

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

See every supply chain check

Questions

How severe is Software bill of materials publicly served?
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-sbom-document-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Software bill of materials publicly served map to?
It maps to CWE-540. In the OWASP Top 10 it falls under A06: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 software bill of materials publicly served

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

Software bill of materials publicly served fix | VulnRadar