Skip to main content
Menu
Advisories

Server mode: state, caches and credentials are shared between scans of different clients

GHSA-9232-CJMP-GG6QPublished Updated GitHub

Description

cdxgen --server keeps state in the process, on disk and in the git credential store, and some of that state carries over from one client's scan to another's. A client can leave data that changes the BOM of a later scan by another client, read metadata that was released only to another client's token, or pause fetches for every later scan.

Details

  • Slices file. getPyModules() in lib/ecosystems/pythonutils.js reused a deps.slices.json left in the server's working directory by a profile=research request, so other clients' Python scans returned the first client's imports.
  • Memoised jars. parseSbtLock() in lib/ecosystems/sbtutils.js shared a jar memo between overlapping scans, so one client's scan could add digests to another's component.
  • Disk cache. fetchOne() in lib/inventory/fetchBatch.js keyed the on-disk cache without the token, so metadata fetched with one GITHUB_TOKEN was served to a scan that had a different token or none.
  • Git credential helper. hardenedGitCommand() in lib/inventory/source.js let a saving credential helper store a token that one client put in a URL and reuse it for other clients.
  • Rate limits. noteBuildToolRateLimit() and the retry code in lib/inventory/fetchBatch.js let one scan's HTTP 429 answer empty the BOMs of concurrent Gradle scans and pause a host for every later scan.

The findings in this advisory are:

IssueCodeFirst affected release
Server mode: URL tokens reused across clients via git credential helperhardenedGitCommand() in lib/inventory/source.js7.0.0
Server mode: sbt jar memo lets concurrent scans add hashes to others' BOMsparseSbtLock() in lib/ecosystems/sbtutils.js12.8.1
Server mode: one scan can pause a host for all later scans via 429slib/inventory/fetchBatch.js13.4.0 (no match found in 12.x)
Server: deps.slices.json reused across requests poisons Python BOMsgetPyModules() in lib/ecosystems/pythonutils.js9.9.1
Disk cache key ignores GITHUB_TOKEN, leaking private package metadatafetchOne() in lib/inventory/fetchBatch.jsnot stated (no match found in 12.x)
Server mode: a 429 in one scan empties BOMs of concurrent Gradle scansnoteBuildToolRateLimit() in lib/inventory/buildToolRateLimit.js13.4.0 (no match found in 12.x)

Impact

One client of a shared server can influence or read the results of another client's scan. The effect is limited to the data the server handles (dependency names, hashes, cached package metadata), and several routes need a specific project type or server option.

Patches

Fixed in @cdxgen/cdxgen 13.9.0 (cdxgen/cdxgen#4880). Versions 13.0.0 through 13.8.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.0 through 12.9.2, and no 12.x release contains the fix. Users of 12.x should move to @cdxgen/cdxgen 13.9.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.

Known limits of the fix. The server-only limits (git checkout 1 GiB and 200000 entries, a five-minute git timeout) do not apply to the command line. The prototype-pollution route of this group is in the first advisory.

Workarounds

  • Run one server process per trust boundary, or restart the server after scans of untrusted content.
  • Run the server in secure mode and without a saving git credential helper.

Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-6BBTHBT7, ANT-2026-6SEQUCPU, ANT-2026-8LMBSPQW, ANT-2026-AB0V1H2P, ANT-2026-IL5U4HC4, ANT-2026-NHDDTEVK, and were fixed by AI agents working for the cdxgen maintainers.

References

Affected versions

References

GitHub · cdxgen/cdxgen