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

GHSA-GPH2-38GW-42HR

cdx-verify and cdx-validate accept unsigned or altered BOM content as verified

Parche disponible
Descargar PNG JSON
CVSS 4.0
8.3
Alta
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:L/SA:N 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ón38 dDesde la divulgación, 14 oct 2026, 12:28 a. m.
Detección35 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 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. Hay versiones corregidas disponibles.
Saqué la lupa: aquí hay algo que investigar.Si el fabricante actualiza el aviso, vuelve a mirar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 12.8.6
Monitoreo
Detectada +1
14 oct 26
18 nov 26
21 nov 26
14 oct 26
23 oct 26
2 nov 26
12 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GPH2-38GW-42HR divulgada · CVSS 8.3 (GitHub)
Remediación Parche 12.8.6 @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

The JSF signature verification in `cdx-verify`, `cdx-validate`, and the `verifyBom()` library function could report success for a CycloneDX BOM whose content was never signed by the trusted key. An attacker who can modify a signed BOM (in a registry, in transit, or in a pull request that CI verifies) could add or replace components, or present signatures taken from other documents, without the signer's private key. Verification cost could also be driven up by orders of magnitude with a few kilobytes of extra signature entries.

Details
  1. Root signature stripping (cdx-verify, 12.2.0+). When a BOM had no root `signature` but its components, services, or annotations carried signatures, `cdx-verify` verified only those nested signatures, ignored every unsigned element, and exited 0 ("✓ N nested signature(s) are valid!"). Removing the root signature of any BOM signed with nested signatures (the default for `cdx-sign` and `cdxgen` signing) and adding unsigned components therefore passed verification. Signed components could also be copied from any BOM the key had signed into an otherwise unsigned document.
  2. Trust anchor read from the working directory (cdx-verify, 9.5.0+). Without `--public-key`, `cdx-verify` used `public.key` from the current directory. A CI job that runs `cdx-verify` inside a checked-out pull request verified the attacker's BOM with the attacker's key.
  3. Nested signature presented as a BOM signature (12.2.0+). A component, service, or annotation signature covers `{...object, signature}` — the same shape as a root signature. When a signer signed a submitted BOM whose component was itself shaped like a BOM (`bomFormat`, `specVersion`, `components`), the component could be extracted and verified as a standalone BOM signed by that key.
  4. Ambiguous JSON (12.2.0+). The signed bytes are the RFC 8785 canonical form of the parsed document. `JSON.parse` keeps the last of repeated member names and rounds numbers to IEEE 754 doubles, and the file was decoded leniently, so text such as `{"components":[evil], …signed BOM…}`, `"version": 9007199254740993`, `1e999` (which canonicalizes like `null`), or a signed U+FFFD replaced by an invalid byte verified while parsers that keep the first member, use arbitrary-precision numbers, or decode UTF-8 strictly read different values.
  5. Unverifiable entries accepted silently (12.2.0+). For `signers` and `chain` signatures, verification succeeded when any one entry verified. Entries that no key verified (for example a fabricated "security-team" approval) were neither reported nor rejectable, and removing a co-signer's entry or the last entries of a chain could not be detected.
  6. cdx-validate failed open (12.2.0+). `cdx-validate --public-key` without `--require-signature` exited with the same code for a tampered BOM as for a valid one, and an empty key path or key file skipped verification.
  7. Verification cost amplification (12.2.0+). The whole BOM was canonicalized again for every signature entry, candidate form, and key, with no bound on the number of entries. 800 bogus `signers` entries (about 30 KB) took a 3.4 MB BOM from 0.24 s to 16 s; `chain` entries grew quadratically.
  8. Hardening in the same release: `cdx-sign --mode signers` co-signed content without checking that it still matched the existing signatures; RSA and ECDSA signatures did not commit to the signer's key unless one was embedded; ECDSA signatures were emitted in either `s` form.
Patches

Fixed in `@cdxgen/cdxgen` 13.4.0 and `@cyclonedx/cdxgen` 12.8.6:

  • `cdx-verify` requires `--public-key` or `--secret-key` and never reads a key from the working directory. `--public-key` is repeatable.
  • A root signature is required. `--allow-nested-only` accepts a BOM without one only when every component, service, and annotation carries a signature that verifies, and names the members no signature covers.
  • A signed root must carry `bomFormat` (or `specFormat`) and `specVersion` and only CycloneDX root members, and signed nested elements may not carry `bomFormat`, `specFormat`, or `specVersion`; `cdx-sign` refuses to produce either shape.
  • BOMs that are not UTF-8, repeat a member name, hold a number an IEEE 754 double cannot represent exactly, or hold an unpaired surrogate escape are refused by `cdx-verify`, `cdx-sign`, and `cdx-validate` (when a key is given), including BOMs pulled from OCI registries.
  • Every root and nested `signers`/`chain` entry is reported. `--require-all` requires each entry to verify with one of the keys and each key to verify an entry of the root signature, so removed co-signatures and truncated chains fail.
  • `cdx-validate` exits 4 whenever a key is given and verification fails (`--no-require-signature` restores report-only behaviour); an empty key path or key file is an error.
  • At most 32 entries per signature and no members beside the `signers` or `chain` array; each signed object is canonicalized once and verification memory stays proportional to the document size.
  • `cdx-sign` embeds the signer's public key in the root signature by default, writes low-`s` ECDSA signatures, and requires `--verify-existing-with` (or `--allow-unverified-history`) before appending a `signers` entry.

The signature format is unchanged: BOMs signed by 13.3.0 and 12.8.5 keep verifying.

Workarounds
  • Always pass `--public-key` with a key from a trusted location.
  • Treat a `cdx-verify` success without the line "✓ Signature is valid!" as a failure, and reject BOMs without a root `signature`.
  • Pass `--require-signature` to `cdx-validate`.
  • Reject BOM text with repeated member names or invalid UTF-8 before verifying it.
Residual risk

A signature that an affected `cdx-sign` made over an untrusted nested element carrying `bomFormat` and `specVersion` can still be presented as a BOM signature, because the bytes are identical. Re-sign BOMs whose nested elements came from untrusted input. Removed signature entries are only detected with `--require-all` and the key of every expected signer. With `--allow-nested-only`, nothing protects which signed elements a BOM lists.

Credits

Found during an internal review of the JSF implementation prompted by Erin Shepherd's post on signature verification (https://blog.erincandescent.net/2026/10/mu-annoys-me/).

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:N
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:L
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:L
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
@cyclonedx/cdxgen≥ 9.5.0 < 12.8.6
@cdxgen/cdxgen≥ 13.0.0 < 13.4.0
9.5.0
12.8.6
12.9.2
13.0.0
13.4.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Corregida 12.8.6 0 d 12.9.2 no afectada
Versiones corregidas12.8.613.4.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-gph2-38gw-42hr

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