llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @cdxgen/cdxgen

GHSA-5PC2-GG7C-37C9

Evidence, output and cache paths let a scanned tree make cdxgen write or delete files outside the scan

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
6.0
Media
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición2 dDesde la divulgación, 19 nov 2026, 7:25 a. m.
Detección19 minDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 4.0 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Ni el CISO se despertaría por esta.Bien priorizada, bien dormida.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
07:25 a. m.
09:51 a. m.
07:25 a. m.
08:02 p. m.
08:38 a. m.
09:15 p. m.
09:51 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-5PC2-GG7C-37C9 divulgada · CVSS 6 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Several output paths follow symbolic links or take names from the scanned tree. A repository, archive or registry host can make cdxgen overwrite a file next to the BOM or behind a link, copy a file over another, or delete files in the cache directory. Most routes work with `--no-install-deps` and in secure mode.

Details
  • Evidence slices. `analyzeGolemProject()` in `lib/ecosystems/golem.js` and the matching rusi, atom and dosai code wrote evidence reports through links that the repository planted. `scalasemOutputFile()` in `lib/ecosystems/scalasem.js` took the output name of the Scala semantics slices from the repository's own option, so it could overwrite any file next to the BOM.
  • Output directory checks. `isDeviceOrProcessPath()` in `lib/core/fs.js` blocked output to `/proc/self/...` paths but not to `/proc/self/cwd`, which a `.cdxgenrc` file could name; `isContainedPath()` in `lib/core/projectConfig.js` accepted a `..` segment that follows a link in a `.cdxgen.json` output path.
  • File copies. `safeCopyFileSync()` in `lib/core/fs.js` follows symbolic links, so the sbt plugin backup wrote outside the repository, and `getGradleCommand()` in `lib/ecosystems/gradleutils.js` changed the mode of a symlinked `gradlew` outside the tree in dry runs.
  • cdxrs cache. `cdxrsCanServe()` in `lib/inventory/fetchBatch.js` let a registry host such as `..` make the cdxrs helper delete files in `CDXGEN_CACHE_DIR`.

The findings in this advisory are:

| Issue | Code | First affected release |
|---|---|---|
| Output symlink fix bypassed via /proc/self/cwd in .cdxgenrc | `isDeviceOrProcessPath()` in `lib/core/fs.js` | 13.7.0 (12.x: 12.9.1) |
| scalasem: repo's semantics-slices-file can overwrite any file next to the BOM | `scalasemOutputFile()` in `lib/ecosystems/scalasem.js` | 13.4.0 (no match found in 12.x) |
| Path traversal via registry host makes cdxrs delete files in CDXGEN_CACHE_DIR | `cdxrsCanServe()` in `lib/inventory/fetchBatch.js` | 13.0.0 (no match found in 12.x) |
| Dry run can chmod files outside the scanned tree via symlinked gradlew | `getGradleCommand()` in `lib/ecosystems/gradleutils.js` | not stated (no match found in 12.x) |
| safeCopyFileSync follows symlinks: sbt plugin backup writes outside the repo | `safeCopyFileSync()` in `lib/core/fs.js` | 2.2.3 |
| Evidence slices are written through repo symlinks, even in secure mode | `analyzeGolemProject()` in `lib/ecosystems/golem.js` | 12.8.2 |
| Path traversal in .cdxgen.json output via .. after a symlink | `isContainedPath()` in `lib/core/projectConfig.js` | 9.8.10 |

Impact

Overwriting or deleting files that the user running cdxgen can write, from content the operator did not write. The contents written are mostly JSON from the scan, so the effect is destruction or corruption of files such as configuration and startup scripts, not a chosen payload.

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 2.2.3 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.
Files that atom names itself (the `.chen` cache and `flowsummary-*.json.tmp`) are written by atom, not by cdxgen: see AppThreat/atom#422 and AppThreat/atom#423. atom-tools may write an OpenAPI file through a link as well (AppThreat/atom-tools#111). The cdxrs helper issue is tracked as cdxgen/cdxgen-plugins-bin#217. These are not fixed by cdxgen 13.9.0.

Workarounds
  • Scan untrusted trees as a user that can write nothing outside a scratch directory, for example in a container with a read-only root.
  • Write the BOM with `-o` to a fresh directory and avoid `.cdxgenrc` and `.cdxgen.json` files from untrusted trees.
Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-G91J9NO4, ANT-2026-GK648I0X, ANT-2026-M42WZAK8, ANT-2026-U4EPE5FT, ANT-2026-VM4MXRET, ANT-2026-VPAUSI5G, ANT-2026-Y1OX7VKS, 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
Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:P
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:P
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:L
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
@cyclonedx/cdxgen≥ 2.2.3 ≤ 12.9.2
@cdxgen/cdxgen≥ 13.0.0 < 13.9.0
2.2.3
12.9.2
13.0.0
13.9.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Sin parche — — 12.9.2 afectada
Versiones corregidas13.9.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/cdxgen/cdxgen/security/advisories/GHSA-5pc2-gg7c-37c9

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.