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

GHSA-246Q-M53Q-RJ22

Quadratic-time parsing and backtracking regular expressions in project file parsers allow denial of service

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H 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ón8 dDesde la divulgación, 12 nov 2026, 9:51 p. m.
Detección5 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 3.1 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.
Revisa, agenda, parchea. El clásico de siempre.Calma, café y gestión de vulnerabilidades.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 12.9.2
Monitoreo
Detectada +1
13 nov 26
18 nov 26
21 nov 26
13 nov 26
15 nov 26
17 nov 26
19 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-246Q-M53Q-RJ22 divulgada · CVSS 6.5 (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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Crafted manifests, lock files and configuration files in a scanned tree make cdxgen spend CPU time that grows with the square of the input size, and in a few cases with its cube or exponentially. Kilobytes to a few megabytes of text hold a scan on one core for minutes or longer. Parsing is synchronous, so `cdxgen --server` answers no other request, `/health` included, while such a scan runs, and `CDXGEN_SERVER_TIMEOUT_MS` does not interrupt it. No build tool is involved, so `--no-install-deps` and secure mode do not help.

Details

The causes fall into three patterns: regular expressions with overlapping quantifiers that backtrack on crafted text, linear searches or repeated parsing inside loops over items the tree controls, and lists that are merged or deduplicated by rescanning them on every addition. Most of these parsers run in default scans of the matching ecosystem, including scans without `-t`; the table notes the cases that need an opt-in project type or option.

| Input | Code | First affected release |
|---|---|---|
| Thousands of tiny lock files in a JavaScript or Python project | `createNodejsBom()` in `lib/cli/jsBom.js` | 7.0.2 |
| A long import specifier or bun.lock package name (regular expression) | `addWasmComponentsFromImports()` in `lib/cli/jsBom.js` | 12.2.1 |
| A long `packages` entry in `pnpm-workspace.yaml` (regular expression) | `createNodejsBom()` in `lib/cli/jsBom.js` | 12.4.4 |
| One import statement with many names and a long module specifier; also a very large BOM | `addEvidenceForImports()` in `lib/ecosystems/jsEvidence.js` | 9.6.0 |
| Many descriptors on one `yarn.lock` key line | `parseYarnLock()` in `lib/ecosystems/parsers-js.js` | 9.9.0 |
| Yarn workspace members looked up linearly | `parseYarnLock()` in `lib/ecosystems/parsers-js.js` | 11.8.0 |
| A layered pnpm workspace lock file; time is exponential in the number of layers | `_setTreeWorkspaceRef()` in `lib/ecosystems/parsers-js.js` | 11.1.1 |
| Many locked versions of one installed pnpm package | `pnpmMetadata()` in `lib/ecosystems/parsers-js.js` | 11.5.0 |
| pnpm peer variants that inherit the base dependencies (cubic time and high memory) | `parsePnpmLock()` in `lib/ecosystems/parsers-js.js` | 10.7.0 |
| `vcpkg.json` dependencies matched against all components collected so far | `createCppBom()` in `lib/cli/nativeBom.js` | 13.6.0 (not in 12.x) |
| Many C headers per component | `mergeImportedSymbols()` in `lib/ecosystems/cppEvidence.js` | 13.3.0 (not in 12.x) |
| Many directories that each hold a LICENSE file | `createIncludeAttributor()` in `lib/ecosystems/cppIncludeResolver.js` | 13.4.0 (not in 12.x) |
| Strings of bare `$` characters in `CMakePresets.json` | `expandPresetMacros()` in `lib/parsers/cmakePresets.js` | 13.4.0 (not in 12.x) |
| Deep or wide preset inheritance in `CMakePresets.json`; also a very large BOM | `expandPreset()` in `lib/parsers/cmakePresets.js` | 13.4.0 (not in 12.x) |
| Meson wraps read again for every `meson*.cmake` file | `parseCmakeLikeFile()` in `lib/ecosystems/parsers-misc.js` | 13.6.0 (not in 12.x) |
| A shared Zig dependency resolved again for each `build.zig.zon` | `createZigBom()` in `lib/cli/nativeBom.js` | 13.0.0 (not in 12.x) |
| Thousands of Gradle lockfiles | `parseGradleLockfiles()` in `lib/ecosystems/gradleutils.js` | 13.7.0 (not in 12.x) |
| Artifact names with `_2.N` suffixes in `gradle.lockfile` | `mergeScalaDuplicateComponents()` in `lib/inventory/scalaDedupe.js` | 13.6.0 (not in 12.x) |
| A large parent pom parsed again for every module (Maven not run) | `locateLocalParentPom()` in `lib/ecosystems/parsers-jvm.js` | 13.5.0 (not in 12.x) |
| Nested modules when Maven writes no dependency tree | `readMavenModuleTrees()` in `lib/ecosystems/parsers-jvm.js` | 13.4.0 (not in 12.x) |
| Long `require` lines in `go.mod`; cost grows with the cube of the size | `parseGoModData()` in `lib/ecosystems/parsers-go.js` | 13.0.0 (not in 12.x) |
| `replace` directives searched for every module graph edge | `parseGoModGraph()` in `lib/ecosystems/parsers-go.js` | 13.5.0 (not in 12.x) |
| Many `Cargo.lock` entries of one crate | `parseCargoDependencyData()` in `lib/ecosystems/parsers-rust.js` | 13.3.0 (not in 12.x) |
| A very long `dependencies` array in `Cargo.lock` | `rollupCargoDependencyKinds()` in `lib/ecosystems/parsers-rust.js` | 13.2.0 (not in 12.x) |
| Thousands of `[workspace]` members (non-recursive scans) | `parseCargoTomlData()` in `lib/ecosystems/parsers-rust.js` | 12.3.1 |
| Long whitespace runs in Python lock file markers (regular expression) | `markerExcludesCPython()` in `lib/ecosystems/parsers-python.js` | 13.6.0 (not in 12.x) |
| `pyproject.toml` parsed again for each `pylock` file | `parsePyLockData()` in `lib/ecosystems/parsers-python.js` | 12.3.0 |
| Deeply nested `__init__.py` packages | `projectModuleNames()` in `lib/ecosystems/pythonutils.js` | 13.4.0 (not in 12.x) |
| Crafted entry names in a wheel (regular expressions) | `distInfoStem()` in `lib/ecosystems/pep770.js` | 13.0.0 (not in 12.x) |
| One large `.py` file with the MCP inventory selected | `extractPythonCallArguments()` in `lib/inventory/analyzer.js` | 12.3.2 |
| A long version re-encoded for every reference in `Gemfile.lock` | `parseGemfileLockData()` in `lib/ecosystems/rubyutils.js` | 10.1.0 |
| A long `required_ruby_version` or Gemfile `ruby` line | `rubyRequirementToVers()` in `lib/ecosystems/rubyutils.js` | 13.3.0 (not in 12.x) |
| Library files walked again for every target in `project.assets.json`; can also exhaust the heap | `parseCsProjAssetsData()` in `lib/ecosystems/parsers-dotnet.js` | 9.9.8 |
| `.props` properties copied for every project | `projectPropertyCandidates()` in `lib/ecosystems/parsers-dotnet.js` | 13.4.0 (not in 12.x) |
| Duplicate `.terraform.lock.hcl` blocks combined with many files in one provider directory | `applyProviderLicense()` in `lib/ecosystems/parsers-terraform.js` | 13.4.0 (not in 12.x) |
| Duplicate Terraform providers or modules | `mergeIntoState()` in `lib/ecosystems/parsers-terraform.js` | 13.4.0 (not in 12.x) |
| A shared local Terraform module parsed again for every root | `processRoot()` in `lib/ecosystems/parsers-terraform.js` | 13.4.0 (not in 12.x) |
| Module calls walked again for every `modules.json` record | `collectManifestRecords()` in `lib/ecosystems/parsers-terraform.js` | 13.4.0 (not in 12.x) |
| Root inputs of `flake.lock` searched linearly | `parseFlakeLock()` in `lib/ecosystems/parsers-misc.js` | 11.5.0 |
| Unclosed braces in `flake.nix` or an opam file (regular expressions) | `parseFlakeNix()` in `lib/ecosystems/parsers-misc.js` and `collectDependsEntry()` in `lib/ecosystems/parsers-opam.js` | 11.5.0 |
| Many `depends` entries in one opam lock file | `collectDependsEntry()` in `lib/ecosystems/parsers-opam.js` | 13.2.0 (not in 12.x) |
| A crafted version constraint in `elm.json` (regular expression) | `toSemverRange()` in `lib/ecosystems/parsers-elm.js` | 13.2.0 (not in 12.x) |
| A long scala-cli `//> using` directive or Ollama `Modelfile` line (regular expressions) | `parseScalaCliDirectives()` in `lib/ecosystems/scalacliutils.js` and the Modelfile parser | 13.4.0 (not in 12.x) |
| sbt builds nested inside one another when sbt is not installed | `discoverSbtProjects()` in `lib/ecosystems/sbtutils.js` | 12.7.0 |
| Long names in MCP bundles, normalized before they are truncated | `sanitizeMcpRefToken()` in `lib/inventory/mcpDiscovery.js` | 12.3.2 |
| One Hugging Face model named many times with differing variant lists (AI inventory) | `mergePedigreeVariants()` in `lib/inventory/aiCollector.js` | 12.5.1 |
| Many certificates with the same subject, for example in a Kubernetes TLS secret (certificate inventory) | `linkFallbackIssuers()` in `lib/inventory/certificates.js` | 13.5.0 (not in 12.x) |
| Many files that share one certificate or pinned key (certificate inventory) | `mergeRecords()` in `lib/inventory/certificates.js` | 13.5.0 (not in 12.x) |
| One crafted file with a certificate-like name (certificate inventory) | `readOID()` in `lib/inventory/certificates.js` | 13.5.0 (not in 12.x) |
| A large license policy that a config file in the working directory names | `getComplianceAlert()` in `lib/inventory/licenseEnhancer.js` | 12.7.1 |
| A large `bitbucket-pipelines.yml` (container-manifest and universal scans) | `addSkippedSrcFiles()` in `lib/managers/docker.js` | 10.0.5 |

Impact

Loss of availability for CI jobs, hosted scanners and `cdxgen --server` instances that scan repositories, pull requests or archives from others. Most of these scans eventually finish with a correct BOM; the cases marked in the table also produce very large BOMs or exhaust memory. No data is disclosed or modified.

`docs/THREAT_MODEL.md` and `SECURITY.md` treat algorithmic complexity attacks triggered by untrusted project content as in scope, as distinct from slow scans of large but ordinary projects.

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 7.0.2 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`. The first affected release of each issue is in the table above.

Workarounds
  • Apply a time limit to scans of untrusted content, for example a CI job timeout or `timeout(1)`, and do not share a cdxgen process between untrusted scans and other work.
  • Pass `-t` with only the project types needed.
  • Put `cdxgen --server` behind a reverse proxy with authentication and restart it under a supervisor.
Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-UTC2ADO8, ANT-2026-8UKX1MRV, ANT-2026-U0DXEZ9A, ANT-2026-ZOF0XK2H, ANT-2026-8JSQHBCR, ANT-2026-NGA1759T, ANT-2026-SHO5JARA, ANT-2026-HYUIJSCH, ANT-2026-Z1FECQ47, ANT-2026-1J6VK8W4, ANT-2026-PFBGY65T, ANT-2026-5UE9I434, ANT-2026-F1WAMV94, ANT-2026-QJRLUSMT, ANT-2026-2T9D7US5, ANT-2026-MIRCWU4V, ANT-2026-159R9FEF, ANT-2026-ES1IPZY3, ANT-2026-HMBYPLI0, ANT-2026-T4J32G0T, ANT-2026-M3HRU4RH, ANT-2026-KT24X6FR, ANT-2026-7UXFCN5I, ANT-2026-FMK5NVXT, ANT-2026-HT39D52R, ANT-2026-RP1942XQ, ANT-2026-QET8WEG4, ANT-2026-B3ERN4AL, ANT-2026-LM0R76WN, ANT-2026-DD9IB9BY, ANT-2026-QCLMYEM5, ANT-2026-SDZU1ZSS, ANT-2026-OHKQ8SSA, ANT-2026-99ZTWD8F, ANT-2026-91JZMU0J, ANT-2026-AUC328EY, ANT-2026-3ZSXOFA5, ANT-2026-PCQU72FI, ANT-2026-R9YVANM6, ANT-2026-E2CAL1K5, ANT-2026-QX67CHW9, ANT-2026-2TLB49J4, ANT-2026-Z75RUVZI, ANT-2026-B8ECL8PJ, ANT-2026-TTK52GZH, ANT-2026-PMS69RUN, ANT-2026-44VV1MIE, ANT-2026-WAPKSOUZ, ANT-2026-IDTPHJZL, ANT-2026-R8UUR0YH, ANT-2026-WCRKXRGE.

References
  • https://github.com/cdxgen/cdxgen/security/advisories/GHSA-4v76-rxfx-x42x (earlier quadratic-time parsing advisory for CrewAI files)
  • 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
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
@cyclonedx/cdxgen≥ 7.0.2 ≤ 12.9.1
@cdxgen/cdxgen≥ 13.0.0 < 13.8.0
7.0.2
12.9.1
12.9.2
13.0.0
13.8.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Corregida 12.9.2 0 d 12.9.2 no afectada
Versiones corregidas12.9.213.8.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-246q-m53q-rj22

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