GHSA-6F4G-M372-8939
Terminal escape sequences in a BOM can make cdx-verify display a forged success line
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6F4G-M372-8939 divulgada · CVSS 3.1 (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
An unsigned BOM can make `cdx-verify` show a person at a terminal a line that looks exactly like its success message, including a key name the attacker chooses, for a document that `cdx-verify` actually rejected. The verification result itself is correct: the exit status is 1, so scripts and CI jobs that check it are not misled.
Details
`getBom()` in `bin/verify.js` prints the message of the error that `parseStrictJson()` throws without escaping it. For a repeated member name, `checkStrictJson()` in `lib/parsers/strictJson.js` decodes the name with `JSON.parse` and puts it into a "Duplicate member name" message, and `escapePointerToken()` only rewrites `~` and `/`. A member name that contains escape sequences for terminal control characters therefore reaches the terminal as raw control bytes, which can erase the failure text, return the cursor to the start of the line, write a success line and hide the rest of the message.
Impact
A person who reads `cdx-verify` output instead of its exit status can be led to accept an unsigned or altered BOM. No key is needed and nothing is executed.
Patches
Fixed in `@cdxgen/cdxgen` 13.8.0. Versions 13.4.0 through 13.7.0 of `@cdxgen/cdxgen` are affected. The 12.x line, published as `@cyclonedx/cdxgen`, is also affected from 12.8.6 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`.
Workarounds
- Rely on the exit status of `cdx-verify` and `cdx-validate`, not on their console output.
- Pipe the output through a filter that removes control characters when reading it interactively.
Credit
This issue was found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-4C9PSJI4.
References
- https://github.com/cdxgen/cdxgen/security/advisories/GHSA-gph2-38gw-42hr (earlier advisory about cdx-verify accepting unsigned content)
- 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-6f4g-m372-8939Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
