Credentials in scanned project files are copied into the BOM without sanitizing
Description
cdxgen passes URLs and free text taken from scanned files through sanitizeBomUrl() and sanitizeBomPropertyValue() before writing them to the BOM, which removes user information, query strings and token-shaped values. Seventeen code paths skip or defeat that step, so passwords, tokens and signed query strings that a project keeps in its own files reach everyone who receives the BOM. No outside attacker is involved: the secret has to be in the scanned project already, and the harm comes when the BOM travels further than the source, for example as a release attachment, a Dependency-Track upload or a copy given to a customer.
Details
| Source in the scanned project | Code | Where it lands | Scans that reach it |
|---|---|---|---|
URL-only lines in requirements.txt | parseReqData() in lib/ecosystems/parsers-python.js | cdx:pypi:versionSpecifiers of a component named after the URL scheme | Python, default |
pylock.toml index, wheel, sdist, archive and vcs URLs and [tool] tables | toPropertyValue() in lib/ecosystems/pylockutils.js | cdx:pylock:* | Python, default |
| PEP 770 SBOMs embedded in wheels and virtual environments | parseSbomDocument() in lib/inventory/sbomDocument.js | merged components, purls and properties | Python, default |
git and tarball URLs in bun.lock | parseBunLock() in lib/ecosystems/bunutils.js | version, purl, bom-ref and dependency refs | Bun, default |
.wasm and re-exported URL module specifiers | addWasmComponentsFromImports() in lib/cli/jsBom.js, addEvidenceForImports() in lib/ecosystems/jsEvidence.js | component name, purl, bom-ref, evidence | JavaScript, default and server |
url= parameter of a scala-cli //> using dep directive | parseScalaCliDirectives() in lib/ecosystems/scalacliutils.js | version, purl, bom-ref | scala-cli, default |
@JSImport module URLs | addJsModuleEvidence() in lib/ecosystems/scalasem.js | cdx:scalasem:jsModule and cdx:scalasem:jsModules | Scala, --evidence |
| JDBC URLs in CUBRID, DB2, SQL Anywhere and some Oracle forms | parseJdbcUrl() in lib/ecosystems/scalasem.js | services[].endpoints | Scala, --evidence |
| String literals used as call receivers | addUsageEvidence() in lib/ecosystems/kosi.js | callstack frame function fields | Kotlin, --evidence |
Azure Pipelines fields and Jenkinsfile when blocks | parseAzurePipelinesFile() and parseJenkinsfile() in lib/inventory/ciParsers/ | cdx:azure:*, cdx:jenkins:stage:when, step names | formulation |
include $(shell ...) lines in Makefiles | parseMakeContent() in lib/inventory/ecosystemFormulationParsers.js | cdx:make:includes | formulation |
| OCSP, CA issuer and CRL URLs of certificates | buildCertificateExtensions() in lib/inventory/certificates.js | certificateExtensions | image, rootfs and crypto inventory with the trustinspector plugin |
| MCP endpoint URLs in agent instruction files | agentFormulationParser.parse() in lib/inventory/agentFormulationParser.js | cdx:agent:hiddenMcpUrls, cdx:agent:mcpPackageRefs, services[].endpoints | -t ai-skill, -t mcp |
| MCP resource URIs used as names | primitiveComponentForMcp() in lib/inventory/analyzer.js | component name, bom-ref, provides | -t mcp |
| MCPB and DXT manifest descriptions | componentFromManifest() in lib/inventory/mcpbBundle.js (truncated before sanitizing) | description | -t mcp |
| LangGraph graph references | parseLanggraphConfig() in lib/inventory/communityAiConfigParser.js | services[] property cdx:langgraph:graphEntryPoint | -t ai-skill |
CrewAI tools=[...] lists | parseCrewAiPython() (whitespace removed before redaction) | cdx:crewai:tools | -t ai-skill |
Formulation is written with --include-formulation and --bom-audit, and from 13.7.0 also by default when CI=true.
Impact
Disclosure of credentials that are in a project's source or lock files to people who receive its BOM but not its source. For open-source projects the BOM reveals nothing new; for closed-source projects, internal registries and private PKIs it can hand out working credentials. CDXGEN_SECURE_MODE makes no promise about BOM contents and does not change the result.
Patches
Fixed in @cdxgen/cdxgen 13.8.0. Versions 13.0.0 through 13.7.0 of @cdxgen/cdxgen are affected. The 12.x line, published as @cyclonedx/cdxgen, is also affected by some of the issues above from 10.0.4 through 12.9.1, and no 12.x release contains the fix. Users of 12.x should move to @cdxgen/cdxgen 13.8.0 or apply the workarounds below. File paths in this advisory refer to the 13.x source tree; in 12.x most of the same functions are under lib/helpers/ or in lib/cli/index.js.
cdxgen-plugins-bin 4.4.0 (cdxgen/cdxgen-plugins-bin#193) also hardens the kosi helper, which now keeps literal call receivers out of the usage names it reports. cdxgen 13.8.0 is fixed with any plugins-bin release; the plugins-bin change adds a second layer.
First affected release of each issue:
requirements.txtURL-only lines: 11.7.0pylock.toml: 12.3.0- PEP 770 embedded SBOMs: 13.0.0 (not in 12.x)
bun.lockURLs: 12.8.0- JavaScript
.wasmand re-export specifiers: 10.0.4 - scala-cli
url=parameter: 13.4.0 (not in 12.x) - Scala.js
@JSImportURLs: 13.4.0 (not in 12.x) - JDBC URLs: 13.4.0 (not in 12.x)
- Kotlin call receivers: 13.2.0 (not in 12.x)
- Azure Pipelines and Jenkinsfile fields: 12.2.0
- Makefile
include $(shell ...): 13.7.0 (not in 12.x) - certificate AIA and CRL URLs: 13.5.0 (not in 12.x)
- MCP URLs in agent instruction files: 12.3.1
- MCP resource URIs: 12.3.1
- MCPB descriptions: 13.2.0 (not in 12.x)
- LangGraph graph references: 12.3.1
- CrewAI tools lists: 12.3.1
Workarounds
- Keep credentials out of committed files; use credential helpers,
.netrcfiles or CI secrets instead. - Review BOMs before sharing them, as
docs/THREAT_MODEL.mdrecommends, and strip the affected properties with a post-processing step.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-NJWFKVYH, ANT-2026-61579L10, ANT-2026-EUOBECQT, ANT-2026-4WKQCJH0, ANT-2026-ZMT0XJI6, ANT-2026-JKMK1737, ANT-2026-5GLCTP5V, ANT-2026-APXK0XJ7, ANT-2026-N1M6XU3P, ANT-2026-0L4PELZ8, ANT-2026-L18WT71C, ANT-2026-ABZSVBN7, ANT-2026-GQZVS6OF, ANT-2026-0R4G3VDH, ANT-2026-Z4SQ3E1R, ANT-2026-9K7J3ZN5, ANT-2026-WGIV5IE7.