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

GHSA-374F-WC4J-7GVH

Registry, API and forge credentials are sent to hosts that scanned content or project files choose

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
4.9
Media
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:H/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.
Ponle etiqueta y a la cola. Ordenadito.Esto lo arregla la rutina de siempre.
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-374F-WC4J-7GVH divulgada · CVSS 4.9 (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

cdxgen attaches the operator's credentials to outgoing requests based on a host name or an environment variable, while a scanned project, a project configuration file, a commit or an OCI referrer descriptor decides where the request goes. The author of such content can have a Docker registry login, a Dependency-Track API key, a TEA token, a gem server key, an npm registry login or a forge token sent to a host they choose.

Details
Registry referrer descriptors

When cdxgen fetches an SBOM attached to a container image, a referrer descriptor that carries a `reference` field decides which host receives the next manifest request, and that request carries the credential cdxgen obtained for the image's own registry. A user who can push tags or an image index to a repository on a registry can therefore collect the registry login of anyone who fetches that image's attached SBOM with `cdx-validate -i`, `cdx-verify -i` or `cdx-audit --bom ... --direct-bom-audit`.

`getManifestImageRef()` in `lib/managers/oci.js` returns the descriptor's `reference` verbatim. The loop in `getBomWithOras()` runs it through `parseImageRef()` and calls `fetchManifest()` on the host it names, passing the token obtained for the registry of the image the operator named. Nothing compares the two hosts. If the planted index keeps the genuine SBOM descriptor next to the hostile one, the command still succeeds and `cdx-verify` still reports a valid signature, because the request goes out before any signature check.

On registries that use bearer tokens, only a pull token for the repository the attacker can already push to leaks, or an anonymous token when the token endpoint is on another host. On registries that accept basic authentication, the leaked value is the Basic credential from the Docker configuration or `DOCKER_AUTH`.

Credentials and the host that receives them

cdxgen attaches the operator's credentials to outgoing requests based on a host name or on an environment variable, while a scanned project, a project configuration file or a commit decides where the request goes. The author of a repository, compose file, lock file or commit can have a Docker registry login, a Dependency-Track API key, a TEA token, a gem server API key, an npm registry login or a forge token sent to a host they choose, or to a place where they can read it.

The credential and the way the destination is chosen differ per case:

  • DOCKER_AUTH. `getDockerCreds()` in `lib/managers/oci.js` returns `DOCKER_AUTH` for any registry when no stored login matches. The container-risk rules CTR-009 and CTR-010 rebuild an image reference from the scanned content and ask that registry for an SBOM, so a compose file, Dockerfile, Kubernetes manifest or BOM can name a registry that receives the login.
  • Docker Hub login and the allowlist. `getImage()` in `lib/managers/docker.js` retries a failed pull of `docker.io/<host>/<name>` as `<host>/<name>` after the allowlist approved the first form, and the retry carries the Docker Hub login in `X-Registry-Auth`.
  • Dependency-Track key and TEA token from `.cdxgen.json`. `sanitizeProjectConfig()` in `lib/core/projectConfig.js` let a committed `.cdxgen.json` set `server-url`, `tea-fetch` and `tea-publish` while the key or token came from the operator, so the credential went to the repository's host.
  • Server mode. `validateRequestOptions()` in `lib/server/server.js` refused a client-chosen `serverUrl` with the operator's API key only when the origin differed, so another path on the same origin received the key.
  • npm registry login. `registryLookupForPurl()` in `lib/inventory/source.js` assumed that the registry ends in a slash. With a host-only `NPM_URL` that carries a login, a scoped package name becomes the host of the request and the login goes to it. `parseDenoLock()` in `lib/ecosystems/denoutils.js` let a project `.npmrc` override `NPM_URL` even in secure mode.
  • Gem server key. `getRubyGemsMetadata()` in `lib/ecosystems/rubyutils.js` falls back to rubygems.org per endpoint while the `Authorization` header is built once, so a partly overridden configuration sends `GEM_HOST_API_KEY` to rubygems.org.
  • Forge token. `gitLogCommitsDetailed()` in `lib/inventory/envcontext.js` split `git log` output on a byte that a commit message may contain, so a commit could steer up to five GitHub or GitLab API requests that carry `GITHUB_TOKEN` or `GITLAB_TOKEN`. `parseGitHubUrl()` and `parseGitLabUrl()` in `lib/inventory/forgeEnricher.js` accepted a host name hidden in the path of another URL, so a clone from such an origin made cdxgen query a private repository with the operator's token.

The findings in this advisory are:

| Issue | Code | First affected release |
|---|---|---|
| Secure mode: project .npmrc overrides NPM_URL in deno.lock scans | `parseDenoLock()` in `lib/ecosystems/denoutils.js` | 12.8.0 |
| forgeEnricher host check bypass leaks private PR review metrics into BOM | `parseGitHubUrl()` in `lib/inventory/forgeEnricher.js` | 12.7.1 |
| Predictive audit leaks NPM_URL credentials to a host named by an npm scope | `registryLookupForPurl()` in `lib/inventory/source.js` | not stated (no match found in 12.x) |
| Registry credential leak to any host named in OCI referrer descriptors | `getManifestImageRef()` in `lib/managers/oci.js` | 12.7.0 |
| CDXGEN_ALLOWED_HOSTS bypass: pull retry drops docker.io but keeps Hub login | `getImage()` in `lib/managers/docker.js` | 13.5.0 (12.x: 12.8.7) |
| BOM audit leaks DOCKER_AUTH to any registry named by scanned projects | `getDockerCreds()` in `lib/managers/oci.js` | 12.7.0 |
| Private gem server API key leaks to rubygems.org for multi-platform gems | `getRubyGemsMetadata()` in `lib/ecosystems/rubyutils.js` | 12.8.3 |
| Commits with 0x1e forge git log records and steer GITHUB_TOKEN API requests | `gitLogCommitsDetailed()` in `lib/inventory/envcontext.js` | 12.7.1 |
| Operator's API key and TEA token leak to hosts set in repo's .cdxgen.json | `sanitizeProjectConfig()` in `lib/core/projectConfig.js` | 9.8.10 |
| Server mode leaks operator's API key if serverUrl differs only in path | `validateRequestOptions()` in `lib/server/server.js` | 9.8.10 |

Impact

Disclosure of the operator's credentials, or of data read with them, to the author of scanned content. Each route needs the operator to run a specific command (a BOM audit, `cdx-validate -i`, a deep scan, `--tea-fetch`) or a server with a credential set. A leaked credential gives the recipient the access that credential grants on another system, which the vector scores as a subsequent-system impact. With a basic registry credential this can be everything the account reaches.

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 9.8.10 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.
`S1S6CK7F` was fixed in two steps: the TEA half is in 13.8.0 (commit 32cd80fd8) and the Dependency-Track half in 13.9.0. `DOCKER_AUTH` still defaults to `docker.io` and is sent only to the registry named by `DOCKER_SERVER_ADDRESS`. A referrer descriptor is accepted only when it is a digest reference in the same repository as the image.

Workarounds
  • Use a registry login limited to read access on the repositories that the workflow needs, and avoid `DOCKER_AUTH` with a shared account.
  • Verify attached SBOMs only for images from registries and repositories that you control, or with `CDXGEN_ALLOWED_HOSTS` restricted to the registry host in secure mode.
  • Give cdxgen credentials that can read only what the scan needs, and unset `DOCKER_AUTH`, `GEM_HOST_API_KEY`, `GITHUB_TOKEN` and `NPM_URL` credentials for scans of untrusted content.
  • Run scans of untrusted content in secure mode with `CDXGEN_ALLOWED_HOSTS` set, and review a `.cdxgen.json` in a tree before you scan inside it.
  • In server mode, do not let clients choose `serverUrl`.
Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-0RATASDL, ANT-2026-5WY66LEN, ANT-2026-B9DTNE02, ANT-2026-DQDYCVXP, ANT-2026-GE7TK2CI, ANT-2026-GQVD3JVU, ANT-2026-GSJ0J4OE, ANT-2026-L42RWFS3, ANT-2026-S1S6CK7F, ANT-2026-YKRA3Y9F, 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:H
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≥ 9.8.10 ≤ 12.9.2
@cdxgen/cdxgen≥ 13.0.0 < 13.9.0
9.8.10
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-374f-wc4j-7gvh

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