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

GHSA-XF67-RMRX-H6MP

Scanned content and server requests can read host files and directories outside the allowed or scanned tree

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
2.3
Baja
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/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.
Esto es menos peligroso que un captcha de semáforos.Ni el pentester más aburrido usaría esto.
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:14 p. m.
09:51 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-XF67-RMRX-H6MP divulgada · CVSS 2.3 (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

Readers for lock files, manifests, container layers and server requests open paths that content names, or follow symbolic links, without checking that the result stays inside the scanned tree or the allowed paths. The author of a repository, archive, crate, image, manifest or server request learns names, hashes, selected fields or the existence of files on the scanning host, and in a few routes can have a file copied, deleted or probed. The group also holds the `CDXGEN_ALLOWED_PATHS` bypasses of server mode (comma lists, links, unscoped provenance reads), the settings a scanned tree's `.cdxgen.json` can override, and one local-user case in OBOM scans.

Details
Server allowed-path bypasses

A client of `cdxgen --server`, or a user of the command line with `CDXGEN_ALLOWED_PATHS` set, can scan or write outside the allowed paths. The path may be a comma-separated list whose entries are not checked, a symbolic link or a `.cdxgenrc` that resolves outside, or a request that makes the provenance reader look at the server's own working directory.

  • Comma lists. `createMultiXBom()` in `lib/cli/index.js` splits a path string on commas, but the allowlist compared the whole string, so `/allowed,/etc` passed.
  • Symbolic links. `realPathOrResolved()` in `lib/inventory/source.js` (used for the allowed-path check and by the `.cdxgenrc` reader) let a link or a missing component bypass the realpath check, and the CLI scanned and wrote `bom.json` outside the allowed paths.
  • Provenance reader. `start()` in `lib/server/server.js` ran the `ai-provenance` collector on the server's working directory for a request whose path was allowed, so the response carried git metadata of the server's own repository.
Host file disclosure

Readers for lock files, manifests and container layers open paths that scanned content names, or follow symbolic links in scanned content, without checking that the result stays inside the scanned tree. The author of a repository, archive, crate, image or manifest who can later read the BOM learns names, hashes, selected fields or the existence of files on the scanning host. Most routes work with `--no-install-deps` and with secure mode when the Node.js permission model is not enabled.

The routes read host data in three ways. Some copy fields of a host `package.json`, gemspec, crate manifest, license file or Go module directory into the BOM. Some record names and hashes of files that a link or an absolute path in an image points to. Some only reveal whether a chosen host path exists, through a component that appears or does not.

A Windows route differs: UNC paths in includes and build files make cdxgen touch a remote share, which sends the user's NTLM hash to the share's host.

OBOM Python environment probe

When root runs `cdxgen -t os` (OBOM) on a host with other users, the probe for Python virtual environments walks each home directory and follows symbolic links at every step. An unprivileged local user can get names, versions and summaries of Python packages from directories that only root can read into the OBOM, learn whether chosen directories or files exist, or make the scan run out of memory or hang.

`sitePackagesOf()` and the readers around it in `lib/ecosystems/venvProbe.js` use `statSync()`, `readdirSync()` and plain reads on the path from the home directory through `pyvenv.cfg`, `lib`, `site-packages`, `*.dist-info` and `METADATA`, and never check that the real path stays inside the home directory. `readMetadata()` checks the size with `stat`, so a link to a zero-size `/proc` file is read without bound. This is the Python counterpart of the RubyGems probe that was fixed in 13.8.0.

Project configuration file of the scanned tree

When cdxgen is started inside a checkout, a `.cdxgen.json` or `.cdxgenrc` in that checkout supplies option values. Three of those options reached code that should have been under the operator's control alone: a `type` value containing `../` made evinse read and delete another project's evidence files, `compile-commands` re-enabled the repository's own compilation database in secure mode, and `tui` made cdxgen start itself without end.

  • Slice type. `createSlice()` in `lib/evinser/evinser.js` used the `type` value from the config in the path of the slice and atom files it copied into the BOM and then deleted. The fix for earlier reports dropped unknown types in the config reader, and the final check at the point of use was missing.
  • compile-commands. `findCompileCommands()` in `lib/inventory/atomUtils.js` returned `options.compileCommands` before it reached the secure-mode check, and yargs merges the config file into the same option, so a repository could name its own `compile_commands.json`.
  • tui. A repository whose `.cdxgen.json` contains `tui` made one `cdxgen` run start `cdxgen` and `cdxui` processes without end when started from a terminal with the cdxui plugin installed; memory grows by about 100 MB per level.

The findings in this advisory are:

| Issue | Code | First affected release |
|---|---|---|
| Zig resolver leaks user name via absolute Zig cache paths in the BOM | `parseManifestAt()` in `lib/ecosystems/zigResolver.js` | not stated (no match found in 12.x) |
| Symlinks bypass realpath checks for server allowed paths and .cdxgenrc | `realPathOrResolved()` in `lib/inventory/source.js` | 13.5.0 (12.x: 12.8.7) |
| Server path allowlist bypass: createMultiXBom splits path on commas | `createMultiXBom()` in `lib/cli/index.js` | 11.2.5 |
| Path traversal via OCI index.json digest: host file read and DoS | `resolveArchiveManifest()` in `lib/managers/docker.js` | 12.3.0 |
| Repo symlink lets CLI scan and write bom.json outside CDXGEN_ALLOWED_PATHS | `bin/cdxgen.js` | 12.3.0 |
| Secure mode lets a scanned repo's .cdxgen.json set compile-commands | `findCompileCommands()` in `lib/inventory/atomUtils.js` | 13.3.0 (no match found in 12.x) |
| Path traversal in scalasem classpath leaks host jar class names into BOM | `buildScalaJoinIndex()` in `lib/ecosystems/scalasem.js` | not stated (no match found in 12.x) |
| Server mode: ai-provenance leaks server cwd's git metadata past allowed paths | `start()` in `lib/server/server.js` | 12.7.1 |
| vcpkg .list path traversal lets the BOM leak whether host files exist | `readVcpkgInstalledIndex()` in `lib/ecosystems/cppIncludeResolver.js` | not stated (no match found in 12.x) |
| Endless cdxgen-cdxui spawn loop when a repo's .cdxgen.json enables tui | `bin/cdxgen.js` | 12.6.0 |
| C/C++ scans leak NTLM hashes via UNC paths in includes and build files | `lib/ecosystems/cppBuildContext.js` | 13.4.0 (no match found in 12.x) |
| Path traversal via .cdxgen.json type reads and deletes evidence slices | `createSlice()` in `lib/evinser/evinser.js` | 11.2.6 |
| Repo symlinks and manifest paths leak host files and env vars into the BOM | `getAllFilesWithIgnore()` in `lib/core/fs.js` | not stated (no match found in 12.x) |
| Python first-party check follows symlinks, leaking whether host paths exist | `isFirstPartyModule()` in `lib/ecosystems/pythonutils.js` | 13.4.0 (no match found in 12.x) |
| Symlinked license-file in unpacked crate leaks host files into the BOM | `readExtractedManifest()` in `lib/ecosystems/cargoCache.js` | 13.4.0 (no match found in 12.x) |
| Path traversal in Go license lookup: parseGoListDep strips quotes from Dir | `parseGoListDep()` in `lib/ecosystems/parsers-go.js` | 12.1.2 |
| Path traversal in registry lookup URLs leaks private package metadata | `npmRegistryKey()` in `lib/ecosystems/ecosystems.js` | 10.1.0 (no match found in 12.x) |
| Symlink escape in rootfs scans leaks host packages into the image BOM | `getPkgPathList()` in `lib/managers/docker.js` | 5.2.1 |
| OBOM venv probe follows user symlinks as root, leaking root-only metadata | `sitePackagesOf()` in `lib/ecosystems/venvProbe.js` | not stated (no match found in 12.x) |
| Directory.Packages.props lookup ignores allowed paths, leaks versions | `getCentralPackageVersions()` in `lib/ecosystems/parsers-dotnet.js` | 13.0.0 (12.x: 12.8.3) |
| Path traversal via Cargo.lock crate version leaks host files into BOM | `readExtractedManifest()` in `lib/ecosystems/cargoCache.js` | 12.8.0 (no match found in 12.x) |
| Path traversal in container scans leaks host file names and hashes | `collectExecutables()` in `lib/inventory/osPackageResolver.js` | 12.4.0 |

Impact

Disclosure of host file metadata to anyone who authors scanned content and can read the resulting BOM, for example as a CI artifact, a Dependency-Track project or a server response. Contents of arbitrary files are not copied by most routes; the fields that are copied come from files with a particular name or format. The settings routes can also copy and delete another project's evidence files and start `cdxgen` without end from a `tui` setting. The OBOM venv probe is a local-user case: an unprivileged user gets metadata of root-only Python environments into a root-run OBOM. Running under the Node.js permission model with narrow `--allow-fs-read` grants, as the `cdxgen-secure` image does, blocks the reads.

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 5.2.1 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.
Rootfs scans now resolve links inside the image root, so `usr/bin/sh -> /bin/sh` keeps working and links to host paths do not (`SE21G4LR`). Discovery of files by glob skips links that resolve outside the searched directory, with `CDXGEN_FOLLOW_EXTERNAL_SYMLINKS=true` as an opt-in that is ignored in secure mode (`NWLZ4BSK`). Comma-separated paths are split only when the whole string is not an existing path, and each entry is checked. The kosi helper follows links out of its directory on its own account and is tracked as cdxgen/cdxgen-plugins-bin#216.

Workarounds
  • Do not expose `cdxgen --server` to clients that you do not trust, and run it in a container that holds no other projects or secrets.
  • Use one path per request and avoid comma-separated values.
  • Run scans of untrusted content under the Node.js permission model with read access limited to the scanned tree and the tools cdxgen needs, for example with the `cdxgen-secure` image.
  • Scan untrusted content in a container that holds no secrets or other projects, and scan fresh clones rather than copied or unpacked trees.
  • Avoid `--deep` and `--evidence` for untrusted repositories, and review BOMs before sharing them.
  • Run OBOM scans with a restrictive umask (for example `umask 077`) and keep the BOM unreadable to other users.
  • Where other users can write their home directories, run OBOM scans in a time-limited job.
  • Review or remove `.cdxgen.json`, `.cdxgenrc` and `.cdxgen.yml` in trees that you do not control before you scan inside them, or start cdxgen from a directory outside the tree.
  • Pass `--no-tui` explicitly.
Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-1MPRQPVO, ANT-2026-5SBZDSFO, ANT-2026-6AMW7ADX, ANT-2026-6BBSL7YN, ANT-2026-7X4Y7AQ0, ANT-2026-9ZHAWOJL, ANT-2026-A7OJ8TJ2, ANT-2026-CQEF7LZA, ANT-2026-EEHIOKSS, ANT-2026-GI3FN01B, ANT-2026-HWBMNA24, ANT-2026-MUWOP0DN, ANT-2026-NWLZ4BSK, ANT-2026-O2VRACXZ, ANT-2026-P2KWC5ER, ANT-2026-R74V9Z4H, ANT-2026-S1X567W5, ANT-2026-SE21G4LR, ANT-2026-SMU2HDXR, ANT-2026-SXUPK9JW, ANT-2026-T0LRUGJB, ANT-2026-VQ3XMQFB, 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:L
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
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≥ 5.2.1 ≤ 12.9.2
@cdxgen/cdxgen≥ 13.0.0 < 13.9.0
5.2.1
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-xf67-rmrx-h6mp

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