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

GHSA-4P2J-75XR-7VC4

C/C++ scans run a compiler that the scanned repository names in compile_commands.json

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión13.8.0
Exposición8 dDesde la divulgación, 12 nov 2026, 9:51 p. m.
Detección5 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Revisa si tu versión cae en el rango. Te espero.Ponle fecha: las tareas sin fecha son leyendas.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
13 nov 26
18 nov 26
21 nov 26
13 nov 26
15 nov 26
17 nov 26
19 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4P2J-75XR-7VC4 divulgada · CVSS 8.8 (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

To identify the compilers of a C/C++ project, cdxgen runs each compiler driver named in the project's `compile_commands.json` with `--version`. The check that is meant to keep this to real toolchains, `trustedCompilerPath()`, only refuses paths spelled inside the scan root. A database can therefore name a program shipped in the same checkout, and cdxgen runs it. This happens in `-t c`, `-t cpp` and untyped scans, which otherwise start no project build tool, and it still happens with `--no-install-deps` and `--lifecycle pre-build`.

Details

`trustedCompilerPath()` in `lib/ecosystems/cppBuildContext.js` accepts every absolute path unless `isInsideDir()` places it under the scan root. A file from the same checkout passes this check in three cases:

  • The operator scans a subdirectory of the checkout, and the database names a file elsewhere in it.
  • The path goes through a directory whose name starts with `..`. `isInsideDir()` tests `rel.startsWith("..")`, so such a directory counts as outside even in a scan of the whole checkout.
  • The database spells the scan root in a different letter case on a case-insensitive file system.

The database must give an absolute path. A repository can do this when cdxgen is started inside the checkout (on Linux, through `/proc/self/cwd`) or when the checkout sits at a predictable location such as a CI workspace. `queryCompilerBanner()` then starts the file through `safeSpawnSync()`, and its output is recorded in the BOM as the compiler version.

Impact

The author of a repository, or of a pull request to it, gets code of their choice run on the scanning host with the privileges and environment of the cdxgen process, including any CI tokens or registry credentials. Secure mode, `--dry-run` and a `CDXGEN_ALLOWED_COMMANDS` list that does not include the file are not affected. A repository that `cdxgen --server` clones into a random temporary directory is not reachable, because the database cannot name its path.

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`, does not contain the affected code.

Workarounds
  • Use `CDXGEN_SECURE_MODE=true`, or set `CDXGEN_ALLOWED_COMMANDS` to the tools the scan needs.
  • Scan untrusted repositories from outside the checkout, by path, and scan the whole checkout rather than a subdirectory.
  • Delete `compile_commands.json` files from untrusted checkouts before scanning.
Credit

This issue was found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-3FMLUTQ4.

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
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
@cdxgen/cdxgen≥ 13.4.0 < 13.8.0
13.4.0
13.8.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cdxgen/cdxgen
Corregida 13.8.0 — —
Versiones corregidas13.8.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-4p2j-75xr-7vc4

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