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

GHSA-MH5C-4CV8-GH6C

Command injection through atom when generating evidence for an untrusted repository

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
Parche2 versionesPrimer parche el mismo día de la divulgación
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.
Nivel de sospecha: ceja levantada.Puede que hoy no pase nada. Puede.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 12.9.2
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-MH5C-4CV8-GH6C divulgada · CVSS 8.8 (GitHub)
Remediación Parche 12.9.2 @cyclonedx/cdxgen · 0 d desde divulgación
Divulgación Modificada Última actualización del registro
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 generate evidence, cdxgen runs the bundled atom analyzer on the scanned directory. Values that come from the scanned repository reach shell command strings that atom builds and runs with `sh -c`, so the repository's author can run commands as the user running cdxgen. This works with `--no-install-deps`, in secure mode, and with a `CDXGEN_ALLOWED_COMMANDS` list, because the shell is started by atom and not by cdxgen. The scan exits 0 and writes a normal BOM.

Details

There are two routes.

Config file in the working directory. A `.cdxgen.json` (or `.cdxgenrc`, `.cdxgen.yml`, `.cdxgen.yaml`) may set `evidence`, `usages-slices-file`, `openapi-spec-file` and `output`, and cdxgen only checks that the paths stay inside the config file's directory. `createSlice()` in `lib/evinser/evinser.js` asks atom for `--extract-endpoints`, and atom then runs `atom-tools convert` through `sh -c` with the slices file name pasted in unquoted, so shell syntax in a file name inside the repository is executed. For Ruby scans the config file's `exclude` entries are copied by `buildAtomCommandEnv()` into `CHEN_IGNORE_DIRS`, which atom pastes into another shell string. The only screen on these values, `UNSAFE_SHELL_CHARS_RE` in `lib/inventory/atomUtils.js`, is written for the Windows shell. Config files are read from the working directory, so this route needs cdxgen to be started inside the checkout; the config file can turn evidence on by itself.

atom's own project configuration. cdxgen does not pass `--config` to atom, so atom loads `atom.json`, `.atom/atom.json` or `.atom/config.json` from the directory it analyzes and merges its `frontend.<language>` options. The JavaScript frontend appends its `astgen-out` value unquoted to an `sh -c` command line, and the Ruby frontend does the same with `exclude-regex`. Both functions that start atom for evidence, `createSlice()` in `lib/evinser/evinser.js` and `findAppModules()` in `lib/inventory/atomUtils.js`, are affected.

The shell strings themselves belong to atom. cdxgen's part is passing repository-controlled values to atom without checking them, and letting atom read configuration from the scanned tree.

Impact

Any path that turns on evidence generation is affected: `--evidence`, the `research`, `threat-modeling` and `ml-deep` profiles, the `cbom` and `saasbom` commands, and `evinse`. The author of a scanned repository or pull request can run commands with the scanning job's privileges and environment, for example to read CI secrets. `cdxgen --server` does not run this step and is not affected.

Versions of the 12.x line bundle `@appthreat/atom` 2.5.6. That release runs `atom-tools convert` and `rbastgen` through `sh -c` in the same way, and the config-file route was reproduced against `@cyclonedx/cdxgen` 12.9.1. atom 2.5.6 has no project configuration loader and reads no `atom.json`, so the second route does not apply to releases that bundle it.

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 affected from 9.5.0 through 12.9.1 and is fixed in `@cyclonedx/cdxgen` 12.9.2 (pull request #4791). Because 12.x bundles atom 2.5.6, the backport differs from the 13.x fix: before cdxgen asks atom for `--extract-endpoints`, it checks that the slices file, language, OpenAPI format, work directory and spec file name contain no character a shell would interpret, and otherwise skips endpoint extraction with a warning. Excluded directory names with such characters are left out of `CHEN_IGNORE_DIRS`, and the Ruby frontend is not started on a source path with such characters. As in 13.8.0, `evidence` can only be set by the operator: a config file that sets it is ignored with a warning, and a profile or technique taken from a config file no longer turns evidence on. 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:

  • config-file values passed to atom: 11.2.3
  • atom project configuration in the scanned tree: 9.5.0
Workarounds
  • Do not generate evidence for untrusted repositories.
  • Start cdxgen from outside the checkout and pass the path, so that config files in the repository are not read.
  • Delete `atom.json`, `.atom/` and cdxgen config files from untrusted checkouts before scanning.
Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-AS19W66G, ANT-2026-X0EWKAAR.

References
  • https://github.com/cdxgen/cdxgen/security/advisories/GHSA-phj7-7j69-xmfh (earlier advisory about config files in a scanned repository)
  • 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
  • Fixed in 12.x: https://github.com/cdxgen/cdxgen/pull/4791
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 Última
@cyclonedx/cdxgen≥ 9.5.0 ≤ 12.9.1
@cdxgen/cdxgen≥ 13.0.0 < 13.8.0
9.5.0
12.9.1
12.9.2
13.0.0
13.8.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Corregida 12.9.2 0 d 12.9.2 no afectada
Versiones corregidas12.9.213.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-mh5c-4cv8-gh6c

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