Denial of service from server requests, git hosts, package registries and TEA servers
Description
This advisory covers denial of service through inputs other than the project file parsers: requests to cdxgen --server, error output of a git host, package registry responses, TEA server responses and BOMs handed to cdx-audit, plus two flaws through which one scan leaves a long-running server unable to serve later requests. The two server-request cases need no scanned content at all. One aborts the server process for every client; the other blocks its event loop, /health included, for minutes.
Details
The table lists each input and the code that handles it. The causes are work that grows with the square of an input that the remote party controls, backtracking regular expressions, an unbounded allocation, a file descriptor that is not closed on an error path, and a per-host statistics table that is a plain object, so a host named __proto__ writes onto Object.prototype.
The registry and license cases need the operator to have turned on registry lookups (FETCH_LICENSE=true, CDXGEN_FETCH_PKG_METADATA=true, or --bom-audit for PyPI), which are off by default. The TEA cases need --tea-fetch.
| Input | Code | First affected release |
|---|---|---|
| Server request: a POST of 64 to 128 KB (about 220 bytes gzip-compressed) whose scan path has many segments; the server aborts on heap exhaustion | start() in lib/server/server.js | 9.0.0 |
Server request: an exclude pattern of about 20 characters that backtracks in path.matchesGlob; blocks the event loop for minutes | shouldExcludeAnalyzerPath() in lib/inventory/analyzer.js | 12.4.4 |
| Git host: error text of a failed clone, which is redacted in time quadratic in its length | redactGitOutput() in lib/inventory/source.js | 13.6.0 (not in 12.x) |
| Empty or corrupt zip archives in scanned content; each leaks a file descriptor, so a long-running server later fails scans or returns BOMs with no components | readZipEntry() in lib/inventory/deps.js | 3.1.0 |
A project .npmrc or lock file that names an npm registry host __proto__, with registry lookups on; statistics are written onto Object.prototype and later pnpm scans in the same process fail | combineBatchStats() in lib/inventory/fetchBatch.js | 13.4.0 (not in 12.x) |
| Registry metadata with a long release history shared by many components (registry lookups on) | getNpmMetadata() in lib/ecosystems/ecosystems.js | 12.3.0 |
| Long npm maintainer lists served by a registry the project points a scoped package at (registry lookups on) | isDisjointIdentitySet() in lib/ecosystems/registryProvenance.js | 12.3.0 |
| Registry maintainer data rebuilt for every locked version (registry lookups on) | collectNpmRegistryProvenanceProperties() in lib/ecosystems/registryProvenance.js | 12.8.0 |
| A GitHub LICENSE fetched once and read again for every Terraform module call that names the repository (license fetching on) | getTerraformRegistryMetadata() in lib/ecosystems/terraformRegistry.js | 13.4.0 (not in 12.x) |
Whitespace inside <classifier> in a published dependency pom, when cdxgen reads Maven's text dependency tree | parseMavenTree() in lib/ecosystems/parsers-jvm.js | 12.4.4 |
TEA server: a long checksum list, each entry rehashing the whole downloaded artifact (--tea-fetch) | checksumsVerified() in lib/ecosystems/tea.js | 13.0.0 (not in 12.x) |
TEA server: long UUID and URL values copied to every component (--tea-fetch) | mergeTeaBom() in lib/ecosystems/tea.js | 13.0.0 (not in 12.x) |
Files in a repository that a PyPI package's metadata names, matched by backtracking regular expressions in cdx-audit and --bom-audit | inspectPythonHeuristicFile() in lib/audit/index.js | 12.3.0 |
A BOM given to cdx-audit that repeats one purl across components with many properties | collectAuditTargets() in lib/audit/targets.js | 12.3.0 |
Impact
Loss of availability. An unauthenticated client of cdxgen --server can stop the server from answering other clients, or end the process, with a single small request; CDXGEN_SERVER_TIMEOUT_MS does not interrupt synchronous work. A git host, registry or TEA server that a scan contacts, or the author of a BOM given to cdx-audit, can make command-line runs take minutes or fail. No data is disclosed or modified.
docs/THREAT_MODEL.md treats algorithmic complexity attacks from untrusted server-client, registry and network input as in scope (T2.4), while the server is meant for trusted internal use behind a reverse proxy.
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 3.1.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
- Put the server behind a reverse proxy that authenticates clients, limits request sizes and enforces timeouts, and run it under a supervisor that restarts it.
- Restrict outbound hosts with
CDXGEN_ALLOWED_HOSTSand git hosts withCDXGEN_SERVER_ALLOWED_HOSTS. - Leave registry lookups and
--tea-fetchoff for scans of untrusted projects, and apply a time limit tocdx-auditruns on BOMs from others.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-GAFQSIEV, ANT-2026-HKBWL6AT, ANT-2026-3EBKCJ0C, ANT-2026-GS8ONUJ4, ANT-2026-CUQUCRWC, ANT-2026-C52SDFFC, ANT-2026-VOZ3HIQR, ANT-2026-S9TN0BUZ, ANT-2026-3LHJVRV5, ANT-2026-CLA2F63R, ANT-2026-XBY2TZI6, ANT-2026-4G1ZQMPH, ANT-2026-ZMVH8SX0, ANT-2026-6BOOOQ7V.
References
- github.com/
cdxgen/ cdxgen/ security/ advisories/ GHSA-4v76-rxfx-x42x (earlier quadratic-time parsing advisory) - github.com/
cdxgen/ cdxgen/ blob/ master/ SECURITY.md - github.com/
cdxgen/ cdxgen/ blob/ master/ docs/ THREAT_MODEL.md - Fixed in: github.com/
cdxgen/ cdxgen/ pull/ 4787