Skip to main content
Menu
Advisories

Credentials in scanned project files are copied into the BOM without sanitizing

GHSA-4CC7-JX94-RR7RPublished Updated GitHub

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 projectCodeWhere it landsScans that reach it
URL-only lines in requirements.txtparseReqData() in lib/ecosystems/parsers-python.jscdx:pypi:versionSpecifiers of a component named after the URL schemePython, default
pylock.toml index, wheel, sdist, archive and vcs URLs and [tool] tablestoPropertyValue() in lib/ecosystems/pylockutils.jscdx:pylock:*Python, default
PEP 770 SBOMs embedded in wheels and virtual environmentsparseSbomDocument() in lib/inventory/sbomDocument.jsmerged components, purls and propertiesPython, default
git and tarball URLs in bun.lockparseBunLock() in lib/ecosystems/bunutils.jsversion, purl, bom-ref and dependency refsBun, default
.wasm and re-exported URL module specifiersaddWasmComponentsFromImports() in lib/cli/jsBom.js, addEvidenceForImports() in lib/ecosystems/jsEvidence.jscomponent name, purl, bom-ref, evidenceJavaScript, default and server
url= parameter of a scala-cli //> using dep directiveparseScalaCliDirectives() in lib/ecosystems/scalacliutils.jsversion, purl, bom-refscala-cli, default
@JSImport module URLsaddJsModuleEvidence() in lib/ecosystems/scalasem.jscdx:scalasem:jsModule and cdx:scalasem:jsModulesScala, --evidence
JDBC URLs in CUBRID, DB2, SQL Anywhere and some Oracle formsparseJdbcUrl() in lib/ecosystems/scalasem.jsservices[].endpointsScala, --evidence
String literals used as call receiversaddUsageEvidence() in lib/ecosystems/kosi.jscallstack frame function fieldsKotlin, --evidence
Azure Pipelines fields and Jenkinsfile when blocksparseAzurePipelinesFile() and parseJenkinsfile() in lib/inventory/ciParsers/cdx:azure:*, cdx:jenkins:stage:when, step namesformulation
include $(shell ...) lines in MakefilesparseMakeContent() in lib/inventory/ecosystemFormulationParsers.jscdx:make:includesformulation
OCSP, CA issuer and CRL URLs of certificatesbuildCertificateExtensions() in lib/inventory/certificates.jscertificateExtensionsimage, rootfs and crypto inventory with the trustinspector plugin
MCP endpoint URLs in agent instruction filesagentFormulationParser.parse() in lib/inventory/agentFormulationParser.jscdx:agent:hiddenMcpUrls, cdx:agent:mcpPackageRefs, services[].endpoints-t ai-skill, -t mcp
MCP resource URIs used as namesprimitiveComponentForMcp() in lib/inventory/analyzer.jscomponent name, bom-ref, provides-t mcp
MCPB and DXT manifest descriptionscomponentFromManifest() in lib/inventory/mcpbBundle.js (truncated before sanitizing)description-t mcp
LangGraph graph referencesparseLanggraphConfig() in lib/inventory/communityAiConfigParser.jsservices[] property cdx:langgraph:graphEntryPoint-t ai-skill
CrewAI tools=[...] listsparseCrewAiPython() (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.txt URL-only lines: 11.7.0
  • pylock.toml: 12.3.0
  • PEP 770 embedded SBOMs: 13.0.0 (not in 12.x)
  • bun.lock URLs: 12.8.0
  • JavaScript .wasm and re-export specifiers: 10.0.4
  • scala-cli url= parameter: 13.4.0 (not in 12.x)
  • Scala.js @JSImport URLs: 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, .netrc files or CI secrets instead.
  • Review BOMs before sharing them, as docs/THREAT_MODEL.md recommends, 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.

References

Affected versions

References

GitHub · cdxgen/cdxgen