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

GHSA-P8WX-9PX6-7RMP

Prototype pollution from Meson wrap files lets a scanned repository run commands

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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 estimadaAtender
Priorizar en el próximo ciclo de cambios
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, automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Huele a exploit funcional. Y yo de olores sé.La próxima reunión de cambios es tuya. Llévala.
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-P8WX-9PX6-7RMP divulgada · CVSS 9.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

A `[__proto__]` section in a Meson wrap file (`subprojects/*.wrap`) of a scanned tree writes its `key = value` lines onto `Object.prototype` in the cdxgen process. The inherited properties then become environment variables of the child processes that cdxgen starts, and they fill in cdxgen settings that are read from unset environment variables. The author of a scanned repository, source archive or container image can use this to have a program of their choice run with the privileges and environment of cdxgen. This works with `--no-install-deps` and `--lifecycle pre-build`, needs no build tool, and does not require the operator to select a C/C++ scan.

Details

`readMesonWraps()` in `lib/ecosystems/parsers-misc.js` keeps the sections of a wrap file in plain objects (`sections[section] = sections[section] || {}`). For a section named `__proto__`, `sections[section]` is `Object.prototype`, so every following line of that section is written onto it. The parser runs for each `meson.build` that the C/C++ step finds (`createCppBom()` calls `parseCmakeLikeFile()`, which reads the wraps first). That step also runs in scans without `-t`. It only reads files, so no install setting skips it.

Two things carry the polluted prototype out of the process:

  • Node.js copies inherited properties of a spawn's `env` object into the child's environment. cdxgen builds such objects as `{ ...process.env, ... }`, for example in `hardenedGitEnv()`, and those objects inherit from `Object.prototype`.
  • `readEnvironmentVariable()` returns `process.env[name]`, which falls through to the prototype for a variable the operator has not set, such as `PYTHON_CMD`, `ATOM_CMD` or `POD_CMD`.

Several variables turn this into command execution: `GIT_EXEC_PATH` makes the same scan's `git submodule status` start a helper program from the repository (with a git whose `submodule` command is an external program); `PYTHON_CMD` replaces the interpreter of the formulation probe (formulation is on with `--include-formulation`, and by default under `CI=true` from 13.7.0); `NODE_OPTIONS` and `ATOM_CMD` affect the atom step of C/C++ scans; and `LD_PRELOAD` loads a shared library from the repository into git. The scan that triggers the pollution later fails BOM schema validation, but by then the child process has run.

Impact

Code execution as the user running cdxgen, with that user's environment (CI tokens, registry credentials), from files committed to a scanned tree. This affects command-line and CI scans of untrusted repositories, pull requests and archives, including scans with `--no-install-deps`. `CDXGEN_SECURE_MODE=true` skips some of the routes, but the `LD_PRELOAD` route still loads native code into an allowlisted `git`, and `ATOM_CMD` can name an allowlisted interpreter such as `node`, because the command allowlist compares command names only.

In `cdxgen --server` mode, an unauthenticated client can trigger this by asking the server to scan a git URL it controls. The prototype stays polluted until the process exits, so every later request of every client runs with the injected values. `--dry-run` starts no processes and is not affected.

Patches

Fixed in `@cdxgen/cdxgen` 13.8.0. Versions 13.6.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
  • Scan untrusted trees in a disposable container or VM that holds no credentials.
  • Pass an explicit `-t` that does not include the C/C++ types (`c`, `cpp`, `meson` and their aliases), so that wrap files are not read.
  • In server mode, restrict who can reach the server, restrict git hosts with `CDXGEN_SERVER_ALLOWED_HOSTS`, and restart the process after any scan of a tree that contains `subprojects/*.wrap`.
Credit

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

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:N
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
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
@cdxgen/cdxgen≥ 13.6.0 < 13.8.0
13.6.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-p8wx-9px6-7rmp

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