GHSA-9P6R-XQ8F-M9JP
Secrets from scanned content, the operator environment and options are copied into BOMs, logs and reports
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9P6R-XQ8F-M9JP divulgada · CVSS 6 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Parsers, evidence helpers and error paths copy values that carry secrets into places that are shared: the BOM (component names, versions, purls, external references, properties and the formulation section), the console and CI logs, and `cdx-audit` reports. Some of the values come from files in the scanned project, image or host (URLs with userinfo or tokens, build arguments, command lines, agent and MCP configuration), some from the operator's environment at the request of project files (`$env{NAME}` in a CMake preset, `$(NAME)` in an MSBuild property, an `.npmrc` expansion), and some from the operator's options (the Dependency-Track key and URL in server and command-line logs).
Details
Environment and host data
A scanned project can name an environment variable of the cdxgen process, or a project configuration file can switch on a host inventory, and cdxgen copies the value or the inventory into the BOM, usually into the formulation section. A project that is scanned with formulation on (which `CI=true` implies) can therefore collect tokens, registry credentials and the Dependency-Track API key of the operator from the BOM, wherever the BOM is shared.
- CMake presets. `readCmakeConfigurePresets()` in `lib/inventory/cmakeBuildDirs.js` expanded `$env{NAME}` macros from the scanner's environment into `cdx:cmake:preset:*` properties.
- MSBuild properties. `evaluateMsbuildProperties()` in `lib/ecosystems/parsers-dotnet.js` expanded `$(NAME)` in a `PackageReference` version from the environment.
- npm configuration. `collectNodeInfo()` in `lib/inventory/envcontext.js` ran the npm version probe with the project's `.npmrc`, which could expand any environment variable into the output that formulation records.
- Host inventory. `applyAdvancedOptions()` in `lib/cli/cliOptions.js` honoured an osquery inventory option from a committed `.cdxgen.json`, which put installed crypto package versions, the full system CA store and yum repository URLs of the scanning machine into the BOM.
Project credentials
Parsers for package manifests, lock files, build files, service units and registry metadata copy URLs, versions, build arguments and command lines into component names, versions, purls, external references and properties. Where the value carries userinfo, an access token in a query string, a header or a password on a command line, the credential reaches the BOM verbatim. Anyone who receives the BOM (a Dependency-Track instance, a customer, a public release asset) can read it without access to the source.
The secret must already be stored in the scanned content. cdxgen's property sanitizer covers the common cases, and each entry in the table is a place where a value bypassed it: a parser that stored a raw URL, version or argument in a component field (CMake `CPMAddPackage` without a name, opam pins and build arguments, Podspec header values, Python direct references, EDN and Coursier coordinates), a form of URL that the sanitizer did not parse (a missing path, no scheme, an unencoded purl source, lock file URLs), a lock file key that carries a token, or a command line of a service unit, process or `compile_commands.json` entry that begins with environment assignments or carries a password.
AI, MCP and agent inventories
The scanners behind `-t ai-skill`, `-t mcp` and the AI-BOM paths copy server arguments, URLs, commands, front matter and tool schemas from agent and MCP configuration files into component properties. The property sanitizer that is meant to remove secrets missed several shapes, so API keys, bearer tokens and passwords reach the BOM.
The sanitizer in `lib/core/propertySanitizer.js` did not recognise common secret key names, OpenAI and Anthropic key formats, base64 bearer tokens, secrets in object keys, or executable paths that contain `@` or a drive letter. Parsers added their own gaps: `extractPackageRefs()` copied server arguments to `cdx:mcp:packageRefs`, `mcpUrlsForText()` split comma-separated URLs in `AGENTS.md` into pieces that bypassed URL handling, `parseFrontmatter()` failed to match front matter that starts with a byte order mark and then copied the whole text, and `collectDosaiAiComponents()` copied tool schemas and prompts from the dosai helper.
Evidence helpers
Evidence generation for Go, Kotlin, .NET and Rust maps the output of helper tools into component properties, endpoints and call stacks. Several of those values reach the BOM unsanitized: webhook and bot tokens in HTTP routes, secrets in configuration values and annotations that kosi resolves into routes, query-string secrets in dosai path templates, and source text of closures that rusi puts into frame names.
`golemServerRoute()` and `sanitizeGolemEndpointUrl()` in `lib/ecosystems/golem.js` kept the path secrets of webhook and bot URLs, including Discord versioned webhook paths. `collectKosiApiEndpoints()` in `lib/ecosystems/kosi.js` kept configuration secrets in inbound routes and API keys in `PreAuthorize` expressions. `collectDosaiServiceComponents()` in `lib/inventory/dosai.js` copied path templates with query strings. `addUsageEvidence()` in `lib/ecosystems/rusi.js` named call stack frames after closure source text.
Logs, errors and reports
Error paths and report writers print values that carry credentials: URLs with tokens, parse error excerpts that quote nearby lines, the Dependency-Track API key and URL, the contents of a gemspec, and registry or repository URLs with userinfo in `cdx-audit` reports. Logs of CI jobs, servers and shared terminals are often readable by more people than the secrets are meant for.
Each entry is a place where a message, an exception or a report took a value from scanned content or from the operator's options and printed it without redaction:
- Server logs. The URL parse error handler and the start-up code in `lib/server/server.js` logged the git token and the Dependency-Track API key, and the Dependency-Track URL with embedded credentials.
- Command-line tools. `bin/cdxgen.js` logged a git URL token when a scan ran with `--evidence`, and printed the Dependency-Track API key to stderr when an upload failed. `bin/convert.js` wrote credentials from CycloneDX 2.0 loss reports to CI logs.
- Parser errors. `parseGemspecData()` in `lib/ecosystems/rubyutils.js` logged the whole gemspec (or the target of a symbolic link of that name) when it could not find a gem name. `parseToml()` in `lib/core/toml.js` and `validateBom()` in `lib/validator/bomValidator.js` quoted lines of the document in their errors, including nested GitLab CI script lists. A failed `gradle properties` run printed its output, and TEA fetch errors printed artifact URLs.
- Reports. `auditTarget()` in `lib/audit/index.js` kept credentials in registry and repository URLs in the `cdx-audit` JSON report, the introspection reports kept values whose names are dotted or camel-case (`isSensitiveAssignmentName()` in `lib/core/buildLedger.js`), and the dry-run activity summary printed secrets.
The findings in this advisory are:
| Issue | Code | First affected release |
|---|---|---|
| CMake preset macros leak cdxgen's env secrets into BOM formulation | `readCmakeConfigurePresets()` in `lib/inventory/cmakeBuildDirs.js` | not stated (no match found in 12.x) |
| ai-skill BOMs leak secrets: propertySanitizer misses common secret key names | `sanitizeStructuredValueEntryForBom()` in `lib/core/propertySanitizer.js` | 12.5.1 |
| propertySanitizer misses OpenAI and Anthropic keys and base64 bearer tokens | `sanitizeTextForBom()` in `lib/core/propertySanitizer.js` | 12.3.3 |
| CPMAddPackage without NAME leaks URL access token into component name | `cmakeFetchDependencies()` in `lib/parsers/cmakeLists.js` | 13.3.0 (no match found in 12.x) |
| golem: Discord webhook tokens in versioned API URLs leak into the BOM | `sanitizeGolemEndpointUrl()` in `lib/ecosystems/golem.js` | 13.5.0 (no match found in 12.x) |
| Rust callstack evidence leaks closure source text, including secrets | `addUsageEvidence()` in `lib/ecosystems/rusi.js` | not stated (12.x: 12.5.1) |
| Dry-run activity summary leaks credentials embedded in registry URLs | `hook()` in `lib/core/activity.js` | 12.3.1 |
| parseGemspecData leaks whole .gemspec, or its symlink target, to logs | `parseGemspecData()` in `lib/ecosystems/rubyutils.js` | 11.1.0 |
| Server mode logs git token and Dependency-Track API key on URL parse error | `getQueryParams()` in `lib/server/server.js` | 11.2.5 |
| Secrets in MCP server args leak into the BOM via cdx:mcp:packageRefs | `extractPackageRefs()` in `lib/inventory/mcpConfigParser.js` | 12.3.1 |
| Byte order mark breaks AI frontmatter parsing, leaking secrets into SBOM | `parseFrontmatter()` in `lib/inventory/communityAiConfigParser.js` | not stated (12.x: 12.3.1) |
| --bom-audit leaks tokens from repo URL query strings into the BOM | `sanitizeRemoteUrlForLogs()` in `lib/inventory/source.js` | 12.3.0 |
| opam parser reads build args as dependencies, leaking secrets into BOM | `parseOpamLockedFile()` in `lib/ecosystems/parsers-opam.js` | not stated (no match found in 12.x) |
| Comma-separated MCP URLs in AGENTS.md leak credentials into the BOM | `mcpUrlsForText()` in `lib/inventory/agentFormulationParser.js` | not stated (12.x: 12.3.2) |
| Misparsed pnpm tarball URL keys leak credentials into BOM and logs | `parsePnpmLock()` in `lib/ecosystems/parsers-js.js` | not stated (no match found in 12.x) |
| Scanning a git URL with --evidence leaks its token to the log | `bin/cdxgen.js` | 12.3.0 |
| CocoaPods full scan leaks podspec HTTP header credentials into the BOM | `fullScanCocoaPod()` in `lib/ecosystems/parsers-misc.js` | 11.2.1 |
| Webhook and bot secrets leak into BOM via unsanitized golem server routes | `golemServerRoute()` in `lib/ecosystems/golem.js` | 13.5.0 (no match found in 12.x) |
| cdx:mcp:command leaks secrets for executable paths with @ or a drive letter | `extractCommandExecutable()` in `lib/core/propertySanitizer.js` | not stated (12.x: 12.3.3) |
| Credentials in lockfile URLs leak into BOM externalReferences | `addExternalReferences()` in `lib/cli/bomAssembly.js` | 1.0.2 |
| BOM property sanitizer does not redact secrets in object keys | `sanitizeStructuredValueEntryForBom()` in `lib/core/propertySanitizer.js` | 12.3.3 |
| Credentials in setup.py direct references leak into purls and PyPI lookups | `getPyModules()` in `lib/ecosystems/pythonutils.js` | 8.6.0 |
| cdx-audit leaks registry and repo URL credentials into JSON reports | `auditTarget()` in `lib/audit/index.js` | 12.3.0 |
| Repo .cdxgen.json leaks scanning host's crypto inventory into the BOM | `applyAdvancedOptions()` in `lib/cli/cliOptions.js` | 10.0.0 |
| Server mode logs credentials embedded in the Dependency-Track URL | `start()` in `lib/server/server.js` | 10.9.0 |
| Introspection reports leak credentials with dotted or camelCase names | `isSensitiveAssignmentName()` in `lib/core/buildLedger.js` | 13.1.0 (no match found in 12.x) |
| Failed gradle properties run leaks credentials to the scan log | `executeParallelGradleProperties()` in `lib/ecosystems/gradleutils.js` | not stated (no match found in 12.x) |
| Leading env assignments in compile_commands.json leak secrets into BOM | `entryArguments()` in `lib/parsers/compileCommands.js` | not stated (no match found in 12.x) |
| Dependency-Track API key printed to stderr when BOM upload fails | `bin/cdxgen.js` | 12.7.1 (no match found in 12.x) |
| Default project name leaks git credential from encoded purl source | `bin/cdxgen.js` | 12.3.0 |
| TEA fetch leaks credentials in artifact URLs to the BOM and logs | `checksumsVerified()` in `lib/ecosystems/tea.js` | 13.0.0 (no match found in 12.x) |
| opam pin URLs with no scheme or no path leak credentials into the BOM | `sanitizedPinUrl()` in `lib/ecosystems/parsers-opam.js` | not stated (no match found in 12.x) |
| cdx-convert: CycloneDX 2.0 loss reports leak credentials into CI logs | `bin/convert.js` | 13.7.0 (no match found in 12.x) |
| Unsanitized dosai pathTemplate leaks query-string secrets into the BOM | `collectDosaiServiceComponents()` in `lib/inventory/dosai.js` | 13.1.0 (no match found in 12.x) |
| piptree leaks access tokens from pip direct URLs as component versions | `lib/managers/piptree.js` | 9.1.0 |
| kosi: config secrets in routes and PreAuthorize API keys leak into BOM | `collectKosiApiEndpoints()` in `lib/ecosystems/kosi.js` | 13.2.0 (no match found in 12.x) |
| dotnet: PackageReference version can leak cdxgen's env vars into the BOM | `evaluateMsbuildProperties()` in `lib/ecosystems/parsers-dotnet.js` | 13.4.0 (no match found in 12.x) |
| sbt purls leak auth user name (JitPack token) from Coursier cache | `coursierPrefixToUrl()` in `lib/inventory/jvmLocalRepos.js` | 12.7.0 (no match found in 12.x) |
| Command-line secrets copied unredacted into BOMs (systemd, OBOM, CI) | `parseSystemdUnitFile()` in `lib/managers/binary.js` | 5.3.7 |
| Unredacted credentials in BOM from dosai AI tool schemas and prompts | `collectDosaiAiComponents()` in `lib/inventory/dosai.js` | not stated (no match found in 12.x) |
| npm version probe leaks any env var into the BOM via a project .npmrc | `collectNodeInfo()` in `lib/inventory/envcontext.js` | 12.1.0 |
| TOML parse errors quote nearby lines, leaking credentials into CI logs | `parseToml()` in `lib/core/toml.js` | not stated (no match found in 12.x) |
| parseEdnData uses git URL as version, leaking credentials into the BOM | `parseEdnData()` in `lib/ecosystems/parsers-jvm.js` | 4.0.21 |
| Schema validation errors leak secrets from nested GitLab CI script lists | `validateBom()` in `lib/validator/bomValidator.js` | 12.2.0 |
Impact
Disclosure of credentials to everyone who can read the BOM, a log or a report. The worst case is the operator's own secrets (`GITHUB_TOKEN`, registry credentials, the Dependency-Track key), which a project can collect from a BOM scanned with formulation on (`CI=true` implies it). For secrets that are already stored in scanned files, no outside party steers the scan, and the BOM or log has to be shared.
Patches
Fixed in `@cdxgen/cdxgen` 13.9.0 (cdxgen/cdxgen#4880). Versions 13.0.0 through 13.8.0 of `@cdxgen/cdxgen` are affected. The 12.x line, published as `@cyclonedx/cdxgen`, is also affected by some of the issues above from 1.0.2 through 12.9.2, and no 12.x release contains the fix. Users of 12.x should move to `@cdxgen/cdxgen` 13.9.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`.
Known limits of the fix.
Names that end in `key` are redacted only with a credential qualifier (`api_key`, `accessKey`), so `sort_key` and `sonar.projectKey` stay readable; names ending in `keys`, `creds` and `pass` are redacted. Query parameters that name a URL's target are kept where an ecosystem needs them (NuGet first), and credential parameters, signatures and userinfo are still removed. Lock file keys of older pnpm lockfiles that carry a token are re-keyed without it (`CGLBX0D1`). For `EWPOY3VP`, JSON-valued properties, purl qualifiers, `services[]` endpoints, license URLs and container manifest strings are not sanitized at the shared point; those sinks are a follow-up. On the webhook and bot hosts that cdxgen knows, paths that are not on a list of known routes are reduced to `/`, and plain passwords in a route kosi resolves are still published.
Workarounds
- Run scans of untrusted content without credentials in the environment, or in a container that holds none.
- Do not enable `--include-formulation` or `CI=true` formulation for untrusted repositories, and review the BOM before sharing it.
- Remove credentials from URLs, lock files, build arguments and unit files, and rotate any that were committed.
- Review BOMs for secrets before publishing them, and keep BOMs from private scans private.
- Keep secrets out of agent, skill and MCP configuration files and use environment references instead.
- Review AI and MCP inventories before publishing them.
- Do not commit webhook tokens, bot tokens and API keys to source or configuration, and rotate any that were.
- Review evidence-enriched BOMs before publishing them.
- Restrict access to CI logs and server logs, and rotate credentials that appeared in them.
- Avoid putting credentials in URLs, and keep `--debug` logging off for scans of untrusted content.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-0GF7XRLD, ANT-2026-0RK0TB17, ANT-2026-0UHC0OFT, ANT-2026-136XC30N, ANT-2026-1VPPXF17, ANT-2026-2RIKRUCO, ANT-2026-2Y2BGB6U, ANT-2026-37CGNQYT, ANT-2026-4KR0DRTH, ANT-2026-5MVPT1JO, ANT-2026-8U401YBN, ANT-2026-8WZYMR3U, ANT-2026-AJ0YITRN, ANT-2026-AUE9VS1S, ANT-2026-CGLBX0D1, ANT-2026-CK9AB0LA, ANT-2026-EEA9BHDV, ANT-2026-EOLSXZ9B, ANT-2026-EUDBHA1O, ANT-2026-EWPOY3VP, ANT-2026-FQX5P3SI, ANT-2026-GJ6BMX7S, ANT-2026-HMZ15AAY, ANT-2026-JW7FNRDM, ANT-2026-KG6V4TEA, ANT-2026-L4S2KLG7, ANT-2026-L7T14XZS, ANT-2026-LDVYV5UH, ANT-2026-M8QYLX00, ANT-2026-N4SOUF6Y, ANT-2026-O8LWU9YE, ANT-2026-OVOOXJN1, ANT-2026-QVAJ3SAU, ANT-2026-R0LD8L78, ANT-2026-TT7J3GUB, ANT-2026-U7OFMPEI, ANT-2026-V2FPGCDW, ANT-2026-VV7O3GHJ, ANT-2026-WQ3LUTHV, ANT-2026-YSMVZFZH, ANT-2026-YT8LK6Y1, ANT-2026-YXKVFS7C, ANT-2026-ZD4PV1YW, ANT-2026-ZLJ8W0UM, and were fixed by AI agents working for the cdxgen maintainers.
References
- https://github.com/cdxgen/cdxgen/blob/master/SECURITY.md
- https://github.com/cdxgen/cdxgen/blob/master/docs/THREAT_MODEL.md
- Fixed in: https://github.com/cdxgen/cdxgen/pull/4880
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@cyclonedx/cdxgen |
Sin parche | — | — | 12.9.2 afectada |
13.9.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/cdxgen/cdxgen/security/advisories/GHSA-9p6r-xq8f-m9jpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
