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

GHSA-7PXF-2399-4955

Git HTTP redirects bypass CDXGEN_GIT_ALLOWED_HOSTS

Parche disponible
Descargar PNG JSON
CVSS
—
low
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición15 dDesde la divulgación, 6 nov 2026, 12:11 a. m.
Detección12 dDesde 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 la severidad declarada por GHSA (baja) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Riesgo bajito, como mis ganas de los lunes.Ponla al final de la lista y no pasa nada.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 12.9.1
Monitoreo
Detectada +1
6 nov 26
18 nov 26
21 nov 26
6 nov 26
10 nov 26
13 nov 26
17 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-7PXF-2399-4955 divulgada
Remediación Parche 12.9.1 @cyclonedx/cdxgen · 0 d desde divulgación
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_GIT_ALLOWED_HOSTS` and `CDXGEN_SERVER_ALLOWED_HOSTS` were checked only against the URL cdxgen was given. git follows the HTTP redirect of its first request by default, so an allowlisted host that answers with a redirect could send a clone or `ls-remote` to a host the allowlist does not name. In server mode an unauthenticated client chooses that first URL.

Details

`validateAndRejectGitSource()` and `gitClone()` in `lib/inventory/source.js` (`lib/helpers/source.js` in 12.x) compare the host of the requested URL with the allowlist, then run git through `hardenedGitCommand()`. That wrapper set `core.fsmonitor`, `safe.bareRepository`, the protocol allowlist and, in secure mode, ignored the global and system git config, but left `http.followRedirects` at git's default of `initial`. git therefore followed a 3xx answer to `/info/refs` to any host the permitted protocols could reach, and ran the rest of the clone or `ls-remote` against it. The HTTP client checks every redirect hop since GHSA-259h-c659-9x53, but git's own requests never passed through that check.

Proof of concept

Run two local HTTP servers: one on `127.0.0.1:18080` that answers every request with `302` to the same path on `localhost:18081`, and one on `localhost:18081` that logs requests. Start the server with `CDXGEN_GIT_ALLOWED_HOSTS=127.0.0.1 CDXGEN_GIT_ALLOW_PROTOCOL=http cdxgen --server` and request `/sbom?url=http://127.0.0.1:18080/repo.git&type=js`. The second server logs `GET /repo.git/info/refs?service=git-upload-pack`, although `localhost` is not on the allowlist and a direct request for it is refused.

Impact

The host allowlist is the control that keeps server-mode clones away from internal hosts. Where an allowlisted host can be made to return a chosen redirect, a client could probe internal hosts through timing and errors, clone an unauthenticated internal repository and receive its SBOM, or tie up the server on a slow target. Outside secure mode, git also reads the user's HTTP configuration, so a custom `http.extraHeader` could be sent to the redirect target.

Patches

Fixed in `@cyclonedx/cdxgen` 12.9.1 (#4758, commit 44d6ecb https://github.com/cdxgen/cdxgen/commit/44d6ecb2ee8fcccaa292b44db5ecc17c4c96c399). The fix for `@cdxgen/cdxgen` is in #4759 (commit 170bcb3 https://github.com/cdxgen/cdxgen/commit/170bcb320d1f4c0d74481f6d7855f65034591748) and will ship in 13.7.0. `hardenedGitCommand()` now sets `http.followRedirects=false` in git's command scope whenever a git host allowlist or secure mode applies, which covers every clone and `ls-remote`, and prints a hint when git stops at a redirect. With an allowlist set, a renamed repository has to be requested by its current URL. Without an allowlist, git still follows redirects, since any host is allowed there.

Workarounds

Allowlist only hosts that do not issue redirects to arbitrary destinations, or block outbound connections from the cdxgen server to internal networks at the network layer.

Credits

Reported by @andife.

References
  • GHSA-259h-c659-9x53
  • https://github.com/cdxgen/cdxgen/pull/4758
  • https://github.com/cdxgen/cdxgen/pull/4759

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
@cyclonedx/cdxgen≥ 11.2.5 < 12.9.1
@cyclonedx/cdxgen≥ 13.0.0 < 13.7.0
11.2.5
12.9.1
12.9.2
13.0.0
13.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Corregida 12.9.1 0 d 12.9.2 no afectada
Versiones corregidas12.9.113.7.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-7pxf-2399-4955

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