GHSA-HG24-7Q3V-56QV
Formulation section records the operator's credentials from the environment
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-HG24-7Q3V-56QV divulgada · CVSS 5.9 (GitHub) | |
| Remediación | Parche 12.9.2 | @cyclonedx/cdxgen · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
When cdxgen writes the formulation section of a BOM, it records parts of its own environment. Three gaps let the operator's credentials through in clear text: variable names that end in `_PAT`, `_PSW` or `_PWD`, URL passwords that contain certain punctuation, and secrets in JVM option variables that `java --version` echoes. Anyone who receives the BOM (a release attachment, a Dependency-Track upload, a customer copy) gets a working repository token or registry password. No attacker input is needed.
Details
- Name blocklist. `addFormulationSection()` in `lib/inventory/formulationParsers.js` keeps environment variables whose names start with prefixes such as `GIT_`, `MAVEN_`, `GRADLE_` and `CARGO_`, unless the name or value contains one of the substrings in `ENV_BLOCKLIST`. The list has `token`, `pass`, `key` and `secret`, but not the short forms `_PAT`, `_PSW` (the suffix Jenkins' `credentials()` uses for passwords) or `_PWD`, and values are not checked against the token shapes in `lib/core/propertySanitizer.js`. These values appear in the stub workflow that is built when no CI parser produced one.
- URL credential stripping. `stripUrlCredentials()` cuts a URL at the first of `;`, `,`, `'`, `|`, `"`, a backtick, `<` or `>` and only then looks for the `@` of the user information. A password that contains one of these characters, which RFC 3986 allows unescaped for several of them, leaves the whole value in place.
- Java options. `collectJavaInfo()` in `lib/inventory/envcontext.js` stores the output of `java --version` and `java --list-modules` in the formulation `java` component. `getCommandOutput()` joins stdout and stderr, and a JVM started with `JAVA_TOOL_OPTIONS`, `_JAVA_OPTIONS` or `JDK_JAVA_OPTIONS` prints that value on stderr, so the secret is written twice, although the environment recorder withholds the same variable.
Formulation is written with `--include-formulation` and `--bom-audit`, and from 13.7.0 also by default when `CI=true`.
Impact
Disclosure of the operator's CI credentials to everyone who receives the BOM. The exposure is largest in CI, where such variables are common and BOMs are published.
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.0 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`.
First affected release of each issue:
- name blocklist: 10.0.0
- URL credential stripping: 13.7.0 (not in 12.x)
- Java options: 12.1.0-alpha.1
Workarounds
- Turn formulation off (do not pass `--include-formulation`; from 13.7.0, pass `--no-include-formulation` in CI) for BOMs that are shared.
- Do not keep secrets in variables with the listed prefixes or in JVM option variables in the environment of the cdxgen step, and percent-encode special characters in URL passwords.
- Review the `formulation` section before publishing a BOM.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-1S1RFDK3, ANT-2026-FZ7WCM0Q, ANT-2026-APD8U05F.
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/4787
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 |
Corregida | 12.9.2 | 0 d | 12.9.2 no afectada |
12.9.213.8.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-hg24-7q3v-56qvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
