GHSA-W9PW-R782-3752
Registry and API tokens are used for requests that scanned or remote content chooses
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-W9PW-R782-3752 divulgada · CVSS 5.3 (GitHub) | |
| Remediación | Parche 12.9.2 | @cyclonedx/cdxgen · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
cdxgen attaches the operator's credentials to outgoing requests based on the host name, while scanned content or a remote service chooses what is requested. A scanned repository can have cdxgen read a GitHub document with the operator's `GITHUB_TOKEN` and copy part of it into the BOM; a public Hugging Face model card can have cdxgen read the operator's private repositories with `HF_TOKEN`; and a registry login can be sent over plain HTTP.
Details
- GitHub token and lock file URLs. For a scoped npm package, `npmLookupRegistry()` takes the registry from the lock file's resolved URL, or from a project `.npmrc` line, and does not require a registry root, so a URL on `api.github.com` turns into a request for an arbitrary GitHub API path. `resolveAuthHeader()` and `buildAgentOptions()` in `lib/inventory/fetchBatch.js` add the token for GitHub hosts on both transports, including the cdxrs fetch helper, without checking the scheme, and `getNpmMetadata()` copies the response's `description` into the component without checking that it is a packument. The token itself only goes to GitHub hosts, but an `http://` URL sends it unencrypted. This needs `FETCH_LICENSE=true` (or `CDXGEN_FETCH_PKG_METADATA=true`), secure mode off, and a token that can see more than the scanned repository; it works with `--no-install-deps`.
- Hugging Face lineage. `resolvePedigreeComponent()` in `lib/ecosystems/remote/huggingface.js` fetches every repository listed under `base_model` or `base_models` in a model card, up to 20 per card and two levels deep, with the caller's options, and `resolveHuggingFaceAccessToken()` falls back to `HF_TOKEN` for any target. The publisher of a public model can thereby get base-model names, relations, quantization values and variant labels of private repositories they name into the operator's BOM. This only runs when the operator resolves a Hugging Face reference directly (a `pkg:huggingface/...` purl or a huggingface.co URL).
- Registry login over HTTP. `isSameRegistryHost()` in `lib/managers/oci.js` decides whether the stored Docker login may go to the token realm a registry names in its 401 response. It compares host name and port but not the scheme, so an HTTPS registry whose realm is an `http://` URL on the same host name receives the login over plain HTTP. This needs a registry configured that way, for example behind a TLS-terminating proxy; secure mode blocks the `http:` request. In the 12.x line, `getOciToken()` has no realm check at all and sends the login to whatever realm the registry names.
Impact
Disclosure of private repository metadata to authors of scanned content, when they can read the BOM, and exposure of registry credentials to network observers on misconfigured registries.
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 also affected by some of the issues above from 12.5.1 through 12.9.1, and no 12.x release contains the fix. Users of 12.x should move to `@cdxgen/cdxgen` 13.8.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`.
cdxgen-plugins-bin 4.4.0 (cdxgen/cdxgen-plugins-bin#193) also hardens the cdxrs helper, which no longer reads `GITHUB_TOKEN` from its environment and sends a GitHub token only with a request that carries one. cdxgen 13.8.0 is fixed with any plugins-bin release; the plugins-bin change adds a second layer.
First affected release of each issue:
- GitHub token and lock file URLs: 13.0.0 (not in 12.x)
- Hugging Face lineage: 12.5.1
- registry login over HTTP: 12.7.0
Workarounds
- Give cdxgen tokens that can read only what the scan needs, and leave `FETCH_LICENSE` off for untrusted projects.
- Unset `HF_TOKEN` when resolving models published by others.
- Use secure mode, which refuses plain HTTP.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-88PHIUTQ, ANT-2026-R72FX1VR, ANT-2026-WYTKRJ7X.
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
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@cyclonedx/cdxgen |
Corregida | 12.9.2 | 0 d | 12.9.2 no afectada |
12.9.213.8.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/cdxgen/cdxgen/security/advisories/GHSA-w9pw-r782-3752Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
