Skip to main content
Menu
Advisories

Repository-supplied slices and analyzer output stall or crash evidence generation

GHSA-WMJX-38FF-FH2WPublished Updated GitHub

Description

Evidence generation (--evidence, --deep, the research profile, evinse, saasbom and the Go, Kotlin, Scala, Swift and .NET evidence steps) reads slice files and analyzer output. A scanned repository can commit its own slice files, or shape its sources so that the analyzer output is large, and cdxgen then spends CPU time or memory that grows with the square of that input, or aborts without an evidence BOM.

Details

Several evidence readers take slice files such as usages.slices.json, reachables.slices.json, data-flow.slices.json, deps.slices.json and bom.json.map from the scanned directory when they exist. Their entries are then matched against components by linear search, or copied to every version of a package, so a few hundred kilobytes of JSON cost minutes of CPU or exhaust the heap. The other cases are quadratic loops and one backtracking regular expression in the language-specific evidence steps.

InputCodeFirst affected release
A committed data-flow.slices.json (evinse --with-data-flow)collectDataFlowFrames() in lib/evinser/evinser.js9.6.0
A committed reachables.slices.json naming a package without a version, with many locked versions of itcreateEvinseFile() in lib/evinser/evinser.js13.6.0 (not in 12.x)
Symbolic links to a committed reachables slice, each read as another chunk (--with-reachables)reachablesChunkFiles() in lib/inventory/atomUtils.js13.3.0 (not in 12.x)
Path-item keys in a committed OpenAPI file (Go evidence, saasbom)detectServicesFromOpenAPI() in lib/evinser/evinser.js11.2.3
Committed bom.json.map and usages.slices.json in a Java checkout (evinse -l java)findAll() in lib/evinser/db.js12.1.0
Swift occurrences copied to every version of a package in Package.resolvedparseSemanticSlices() in lib/evinser/evinser.js13.3.0 (not in 12.x)
Committed dosai data-flow slices in a .NET repositorycollectDosaiDataFlowFrames() in lib/inventory/dosai.js12.4.2
A committed deps.slices.json with long dosai strings (-t dotnet --deep)addEvidenceForDotnet() in lib/inventory/evidenceUtils.js12.4.2
dosai purls without versions (--deep)candidateForLocation() in lib/inventory/dosaiParsers.js13.4.0 (not in 12.x)
A committed usages slice in a C/C++ repositorygetCppModules() in lib/ecosystems/cppEvidence.js13.4.0 (not in 12.x)
Repeated entries in a committed deps.slices.json (Python, cdxgen started inside the repository)isFirstPartyModule() in lib/ecosystems/pythonutils.js13.1.0 (not in 12.x)
Many modules and call edges in a Go project (-t go --evidence)symbolModule() in lib/ecosystems/golem.js12.5.0
A run of quotes in a Gradle rootProject.name (Kotlin evidence, regular expression)kosiWorkspaceComponent() in lib/ecosystems/kosi.js13.2.0 (not in 12.x)
Many owners and references in a Scala project (Scala evidence)ScalaJoinIndex.narrow() in lib/ecosystems/scalasem.js13.4.0 (not in 12.x)
A committed bom.json.map (Scala evidence with installs off)matchCoordinates() in lib/ecosystems/scalasem.js13.4.0 (not in 12.x)
Many crypto findings in a Scala project (Scala evidence)scalasemProviderPurl() in lib/ecosystems/scalasem.js13.4.0 (not in 12.x)

Impact

Loss of availability for evidence runs on untrusted repositories, including runs with --no-install-deps and in secure mode, where the repository cannot otherwise run code. cdxgen --server does not run most of these steps. No data is disclosed or modified.

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 9.6.0 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

  • Delete committed *.slices.json and bom.json.map files from untrusted checkouts before generating evidence, or start cdxgen from outside the checkout.
  • Apply time and memory limits to evidence runs on untrusted repositories.

Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-NLI9EQOY, ANT-2026-139ORLJT, ANT-2026-WUBFU6Y4, ANT-2026-9LHV4LU6, ANT-2026-H1L2J8Z2, ANT-2026-5ROMP9QY, ANT-2026-SZKDFHPU, ANT-2026-HWO7G7CV, ANT-2026-VBVTJ6MX, ANT-2026-HQHN33ER, ANT-2026-XR84GH43, ANT-2026-AGDSQNKQ, ANT-2026-S3OQ5GZQ, ANT-2026-KJ2RTW88, ANT-2026-U7IS9HJH, ANT-2026-POT773PO.

References

Affected versions

References

GitHub · cdxgen/cdxgen