Skip to main content
Menu
Advisories

Denial of service from crafted project files, source files, archives and container images

GHSA-6VWW-36X2-C89FPublished Updated GitHub

Description

Crafted manifests, lock files, build and CI files, source files, archives, helper reports and container images in a scanned tree make cdxgen use CPU time or memory that grows with the square, the cube or the exponent of the input size, write BOMs hundreds of times larger than the input, or fill the temporary directory. Kilobytes to a few megabytes of input hold a scan for minutes, exhaust the heap or the disk, or end the process. No build tool is involved, so --no-install-deps and secure mode do not help.

Details

CPU time in project files

Crafted manifests, lock files, build files, CI files, archives and metadata 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. No build tool is involved, so --no-install-deps and secure mode do not help.

The causes follow three patterns: regular expressions with overlapping quantifiers that backtrack on crafted text, linear searches or repeated parsing inside loops over items that 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 code and the first release that is affected.

Memory in project files and archives

Crafted files in a scanned tree make cdxgen allocate memory without a bound, or write BOMs that are hundreds of times larger than the input. Typical shapes are a long string that is copied once per package, per path or per key, an archive that expands far beyond its size, a symbolic link or alias that makes a walk or a YAML document explode, and temporary files that are not removed after an error. A scan of such content ends with an out-of-memory error, a full disk or a BOM of hundreds of megabytes.

Parsing is synchronous, so a heap exhaustion in cdxgen --server ends the process and every other client's scan with it. The table lists the code and the first affected release of each case. Where the finding is about disk (unpacked archives and extracted .vsix files that were not removed), the affected resource is the temporary directory.

Source analysis and evidence generation

The JavaScript analyzer behind --deep, -t cbom and the MCP inventory, evinse, and the evidence code for Scala, Swift, Kotlin and .NET use time or memory that grows faster than the input. A source file, a repository-supplied slices file or a helper report of a few hundred kilobytes can hold a scan for minutes, make a BOM hundreds of times larger than the input, or exhaust the heap.

Causes include regular expressions that backtrack on crafted Vue, Angular and Karma files, repeated resolution of the same path or purl, quadratic or cubic joins between slices and components, Babel scope tracking that the analyzer does not need, narrowing of if and switch conditions in the crypto inventory, copies of per-package lists for every version, and unbounded reads of helper reports. Babel error recovery is now off in the analyzer (N0DFQY2D), so a file with a recoverable syntax error gives no JavaScript evidence instead of a partial result.

Container images

A container image, OCI archive or root filesystem can make cdxgen use unbounded CPU time, memory or disk. Examples are a layer that a manifest lists many times, a decompression bomb in a layer or whiteout file, a file hashed once for every link or path spelling, one glob over the whole image per PATH or ld.so.conf entry, a long WorkingDir, and regular expressions that backtrack on crafted apt source files and library paths.

The scans of images and root filesystems run in default mode, including -t docker and -t oci, and in secure mode. The table lists the code and the first affected release of each case.

The findings in this advisory are:

IssueCodeFirst affected release
Quadratic CPU in caxa and Jenkins scans: all jars share one temp diraddEmbeddedPackages() in lib/ecosystems/caxa.js13.3.0 (12.x: 12.3.1)
AI and MCP inventory: DoS from stringifying deeply nested metadata arraysquantizationMethodFromText() in lib/inventory/aiCollector.js12.3.1
parseCmakeLikeFile: replacement patterns in set() values crash cdxgenparseCmakeLikeFile() in lib/ecosystems/parsers-misc.js9.9.6
Quadratic BOM DoS: GitHub Actions dispatchSenderMatchBasis lists all targetsenrichLocalDispatchRelationships() in lib/inventory/ciParsers/githubActions.jsnot stated (12.x: 12.3.0)
Infinite loop in MODULE.bazel parser on unmatched closing bracketreadValue() in lib/ecosystems/parsers-bazel.jsnot stated (no match found in 12.x)
Quadratic CPU in compareNugetVersions(): long nuspec version parsed per rangecompareNugetVersions() in lib/ecosystems/parsers-dotnet.js13.4.0 (no match found in 12.x)
CPU DoS in getBomWithOras: same blob re-parsed per duplicate referrergetBomWithOras() in lib/managers/oci.js12.7.1
Deep WorkingDir in image config exhausts heap, crashes cdxgen serverextractFromManifest() in lib/managers/docker.js9.0.0
Long Terraform module label copied into every nested key exhausts the heapcollectStaticRecords() in lib/ecosystems/parsers-terraform.jsnot stated (no match found in 12.x)
Cargo deep mode: heap OOM from dep-info list copied per locked versionparseCargoData() in lib/ecosystems/parsers-rust.js10.5.2
Unbounded .mcpb manifest name inflates BOM ~1000xcomponentFromManifest() in lib/inventory/mcpbBundle.js13.2.0 (no match found in 12.x)
Deep JVM scan copies a jar's class list per purl alias, exhausting memorycollectSbtDependencyJars() in lib/cli/jvmBom.js13.4.0 (no match found in 12.x)
Quadratic-time DoS parsing runner arguments in npm lifecycle scriptsfindLifecycleScriptSourceStartIndex() in lib/ecosystems/parsers-js.js12.3.0
Quadratic time in ScalaJoinIndex on long symbols from a scanned repoScalaJoinIndex.isUnowned() in lib/ecosystems/scalasem.js13.4.0 (no match found in 12.x)
Overlong NuGet version copied into every packages.config purl OOMs serverparseCsPkgData() in lib/ecosystems/parsers-dotnet.js13.0.0 (no match found in 12.x)
Quadratic-time DoS in MODULE.bazel parsing via repeated list copiesparseCallArgs() in lib/ecosystems/parsers-bazel.js13.0.0 (no match found in 12.x)
Repeated yarn or pnpm workspace entries multiply directory walks (DoS)createNodejsBom() in lib/cli/jsBom.js11.8.0
enrichGemsFromLocalCache re-parses the gemspec per lockfile entry (DoS)enrichGemsFromLocalCache() in lib/ecosystems/rubyutils.js12.8.3
OOM in dotnet parsers: long framework or paket group name copied per packageparseCsProjAssetsData() in lib/ecosystems/parsers-dotnet.js9.9.0
cargoCache: pax global header bypasses .crate entry size limit (OOM)readCrateArchiveEntry() in lib/ecosystems/cargoCache.js13.4.0 (no match found in 12.x)
ReDoS in .nvmrc and other tool version file parsers with --introspectparseNvmrc() in lib/inventory/toolRequirements.js13.1.0 (no match found in 12.x)
JS import occurrences copied to every locked version, exhausting heapaddEvidenceForImports() in lib/ecosystems/jsEvidence.jsnot stated (no match found in 12.x)
Image scan DoS via one full-image glob per PATH and ld.so.conf entrycollectExecutables() in lib/inventory/osPackageResolver.js11.2.2
Quadratic POM search in collectJarNS: small war takes minutes to scancollectJarNS() in lib/inventory/deps.jsnot stated (no match found in 12.x)
Quadratic-time DoS in parseBunLock via deeply nested package keysparseBunLock() in lib/ecosystems/bunutils.js13.3.0 (no match found in 12.x)
PEP 770 reader re-parses SBOMs per METADATA case variant (server DoS)collectEmbeddedSboms() in lib/ecosystems/pep770.jsnot stated (no match found in 12.x)
Quadratic CPU in resolveInstalledNugetVersion stalls cdxgen serverresolveInstalledNugetVersion() in lib/ecosystems/parsers-dotnet.js13.4.0 (no match found in 12.x)
Quadratic-time DoS in parseSwiftBuildManifest via crafted manifest.pifparseSwiftBuildManifest() in lib/evinser/swiftsem.js13.3.0 (no match found in 12.x)
OOM in MCP inventory: long server name copied into every toolprimitiveComponentForMcp() in lib/inventory/analyzer.jsnot stated (no match found in 12.x)
Terraform: quadratic per-root walk in connectOrphanLockProviders (DoS)connectOrphanLockProviders() in lib/ecosystems/parsers-terraform.jsnot stated (no match found in 12.x)
MCP inventory re-parses a URL variable on every use: quadratic CPU DoSrecordUrlUsage() in lib/inventory/analyzer.jsnot stated (12.x: 12.3.1)
caxa: same sbomFile re-parsed per manifest entry, quadratic CPU DoSaddReachableSbomContents() in lib/ecosystems/caxa.jsnot stated (no match found in 12.x)
Quadratic ReDoS in fileToParseableCode on unclosed Vue markupfileToParseableCode() in lib/inventory/analyzer.js9.6.0
Quadratic BOM blowup: long npm override copied to every manifestSourcecollectNpmManifestSources() in lib/ecosystems/npmutils.jsnot stated (12.x: 12.3.3)
Cached Maven jar re-hashed for every duplicate component (CPU DoS)enrichMvnPackageLocally() in lib/ecosystems/ecosystems.js12.7.0
Quadratic CPU: gemspec version file re-read once per require lineparseGemspecData() in lib/ecosystems/rubyutils.js13.3.0 (12.x: 12.1.5)
ReDoS in isSharedLibraryPath() via crafted container imageisSharedLibraryPath() in lib/managers/binary.js12.4.0
Unbounded CMake presets include expansion blocks the server event loopreadCmakePresetDocuments() in lib/inventory/cmakeBuildDirs.js13.4.0 (12.x: 12.2.0)
ReDoS in svelte.config.js parsing blocks server event loopparseSvelteConfigSource() in lib/inventory/svelteUtils.js13.2.0 (no match found in 12.x)
recurseImageNameLookup takes exponential time on aliased or deeply nested YAMLrecurseImageNameLookup() in lib/ecosystems/parsers-misc.js5.3.0
ReDoS in Jenkinsfile parser stalls cdx-audit and formulation scansparseJenkinsfile() in lib/inventory/ciParsers/jenkins.js12.2.0
CPU DoS in guessPypiMatchingVersion via long setup.py specifierguessPypiMatchingVersion() in lib/ecosystems/ecosystems.js8.6.0
Quadratic CPU in setFileRef: .wasm path re-resolved on every referencesetFileRef() in lib/inventory/analyzer.jsnot stated (no match found in 12.x)
Quadratic ReDoS in parseDistributionLine via crafted cpanfile.snapshotparseDistributionLine() in lib/ecosystems/parsers-perl.js13.2.0 (no match found in 12.x)
Hash-collision DoS in uniqueCryptoAlgorithms via long algorithm namesuniqueCryptoAlgorithms() in lib/inventory/analyzer.jsnot stated (12.x: 12.4.0)
ReDoS in requirements.txt and pylock.toml parsingparseReqEnvMarkers() in lib/ecosystems/parsers-python.js11.7.0
Long OpenAPI server URL repeated per path: cubic-time DoS, 160 MB BOMparseOpenapiSpecData() in lib/ecosystems/parsers-misc.js12.3.1
Substrings retain whole wheel METADATA and MCPB manifests (server DoS)parseBdistMetadata() in lib/ecosystems/ecosystems.jsnot stated (12.x: 12.4.4)
Quadratic jsr dependency resolution in parseDenoLock (CPU DoS)resolveJsrRef() in lib/ecosystems/denoutils.js12.8.0
CPU DoS in guessLicenseId via many crafted LICENSE filesguessLicenseId() in lib/inventory/spdx.jsnot stated (no match found in 12.x)
Quadratic time in parseDeb822Fields lets crafted images stall scansparseDeb822Fields() in lib/managers/binary.js12.4.0
docker: layer listed N times in manifest is extracted N times (CPU DoS)extractFromManifest() in lib/managers/docker.js3.0.2
AI oversight CODEOWNERS coverage check is quadratic in files and rulesisFileCovered() in lib/inventory/aiOversightCollector.js12.7.1
Nested ASAR bomb: createAsarBom limits depth but not archive countcreateAsarBom() in lib/cli/jsBom.js12.4.0
Quadratic CPU in AI-BOM: config.json reprocessed per safetensors shardmodelIdentityFromSiblingConfig() in lib/inventory/aiCollector.js13.2.0 (no match found in 12.x)
Quadratic memory blowup in attachIdentityTools: committed BOM crashes serverattachIdentityTools() in lib/inventory/evidenceUtils.js12.3.3
Unbounded loop in AI inventory via GGUF base model count (DoS)createGgufPedigree() in lib/inventory/aiCollector.js12.5.1
Unbounded replaceAll in crypto inventory exhausts heap, crashes serverresolveStaticValue() in lib/inventory/analyzerScope.js12.4.0
Quadratic edge blowup in buildCargoLockDependencyGraph exhausts heapbuildCargoLockDependencyGraph() in lib/ecosystems/parsers-rust.js13.2.0 (no match found in 12.x)
cdx-audit: DoS via long bom-ref copied into every license violationcollectPolicyViolations() in lib/inventory/licenseEnhancer.jsnot stated (no match found in 12.x)
Unbounded kosi report read lets crafted Kotlin projects exhaust memoryrunKosi() in lib/ecosystems/kosi.js13.2.0 (no match found in 12.x)
Jenkinsfile and lockfile parsers re-parse a file per symlink: heap OOMparse() in lib/inventory/ciParsers/jenkins.jsnot stated (12.x: 12.3.0)
collectSharedLibs re-reads ld.so.conf once per self-include (CPU DoS)collectSharedLibs() in lib/inventory/osPackageResolver.jsnot stated (no match found in 12.x)
DoS via 4 KB .mcpb: string user_config expanded per character to 1 GBsummarizeUserConfig() in lib/inventory/mcpbBundle.js13.2.0 (no match found in 12.x)
Quadratic ASAR path expansion exhausts heap and crashes cdxgen serverlistAsarEntries() in lib/ecosystems/asarutils.js12.4.0
Repeated uv workspace entries cause quadratic blowup and server OOMparsePyLockData() in lib/ecosystems/parsers-python.js11.1.1
Swift evidence: quadratic package attribution, CPU DoS via committed .buildowningPackage() in lib/evinser/swiftsem.js13.3.0 (no match found in 12.x)
Zip bomb in jar and vsix extraction fills temp dir and crashes cdxgenextractJarArchive() in lib/ecosystems/ecosystems.js10.0.1
Temp dir leak in docker image scans lets server clients fill the diskcreateMultiXBom() in lib/cli/index.js10.5.1
docker: unbounded whiteout names exhaust heap and crash cdxgen serverapplyLayerWhiteouts() in lib/managers/docker.js13.5.0 (no match found in 12.x)
Quadratic ReDoS in npm lifecycle-script indicator regexesNPM_LIFECYCLE_EXECUTION_PATTERNS() in lib/ecosystems/parsers-js.js12.3.0
[js] Quadratic-time DoS: addComponent() walks allImports per packageaddComponent() in lib/cli/bomAssembly.js12.5.0
Quadratic time in parseSetupPyFile: 540 kB setup.py takes 80 CPU secondsparseSetupPyFile() in lib/ecosystems/parsers-python.js1.4.25
Terraform: loadMergedConfig is quadratic in the number of override filesloadMergedConfig() in lib/ecosystems/parsers-terraform.jsnot stated (no match found in 12.x)
Symlink loops in Terraform module directories exhaust the heapcollectManifestRecords() in lib/ecosystems/parsers-terraform.jsnot stated (no match found in 12.x)
reattributeSvelteKitModules loops until OOM if an alias maps to itselfreattributeSvelteKitModules() in lib/inventory/analyzer.jsnot stated (no match found in 12.x)
Exclude globs recompiled per atom slice entry (DoS via .cdxgen.json)filterAtomSlicesByExcludePatterns() in lib/inventory/atomUtils.js13.3.0 (12.x: 12.4.4)
angular analyzer: quadratic ReDoS in template icon-class regexesaddAngularTemplatePatternPackageRefs() in lib/inventory/analyzer.js12.5.0
Scala call stack evidence is quadratic when many jars share a classaddCallStackEvidence() in lib/ecosystems/scalasem.js13.4.0 (no match found in 12.x)
Quadratic CPU DoS: Python METADATA names re-normalized per manifestenrichFromInstalledMetadata() in lib/ecosystems/parsers-python.jsnot stated (no match found in 12.x)
Quadratic ReDoS in Angular Karma config patterns stalls JS scansANGULAR_KARMA_CONFIG_PATTERNS() in lib/inventory/analyzer.jsnot stated (12.x: 12.4.4)
Quadratic-time dev and optional dependency marking in parsePnpmLockparsePnpmLock() in lib/ecosystems/parsers-js.js10.7.0
Server heap exhaustion: long git URL repeated per relative submoduleresolveCmakeContext() in lib/ecosystems/cmakeResolver.js13.0.0 (no match found in 12.x)
Quadratic mergeDependencies in container, Bazel and CocoaPods scans (DoS)createMultiXBom() in lib/cli/index.js10.1.0
scalasem jarPathCoordinates is quadratic: deep jar path exhausts heapjarPathCoordinates() in lib/ecosystems/scalasem.js13.6.0 (no match found in 12.x)
Quadratic wasmExports attribution in JS analyzer exhausts heapparseFileASTTree() in lib/inventory/analyzer.jsnot stated (no match found in 12.x)
Deep member chains exhaust memory in chrome-extension capability scandetectExtensionCapabilities() in lib/inventory/analyzer.js12.3.0
ASAR scan re-parses Info.plist per nested archive: quadratic CPU DoScollectAsarSigningInfo() in lib/ecosystems/asarutils.js12.4.0
Quadratic CPU time in evinse attributeCIncludes component lookupattributeCIncludes() in lib/evinser/evinser.jsnot stated (no match found in 12.x)
Quadratic JS scan: Angular check walks all imports per icon propertyparseFileASTTree() in lib/inventory/analyzer.jsnot stated (12.x: 12.3.1)
evinse: quadratic import lookup in parseSliceUsages allows CPU DoSparseSliceUsages() in lib/evinser/evinser.jsnot stated (no match found in 12.x)
Heap exhaustion in parsePodfileLock: external source path copied per subspecparsePodfileLock() in lib/ecosystems/parsers-misc.js11.2.1
Extracted .vsix not cleaned up if analysis throws, filling server diskcreateVscodeExtensionBom() in lib/cli/jsBom.js12.2.0
Unbounded reads of scanned files: symlink or tiny archive kills the servercmakeCompilerFacts() in lib/ecosystems/cppBuildContext.js3.0.2 (no match found in 12.x)
ReDoS in matchCodeowners: crafted CODEOWNERS rule hangs --bom-auditmatchCodeowners() in lib/inventory/aiOversightCollector.js12.7.1
Quadratic BOM blowup in deb822 apt sources: full stanza copied per URIparseDeb822AptRepositorySources() in lib/managers/binary.js12.4.0
ReDoS in GitHub Actions parser via unescaped workflow env namesparseWorkflowFile() in lib/inventory/ciParsers/githubActions.js12.3.0
Quadratic CPU: createCppBom refilters components per FetchContent depwithoutScrapedFetchDependency() in lib/ecosystems/cmakeResolver.js13.3.0 (no match found in 12.x)
YAML alias bomb in GitHub workflow triggers crashes cdxgen and its servernormalizeTriggers() in lib/inventory/ciParsers/githubActions.js12.2.0
Root .npmrc re-parsed for every pnpm-lock.yaml: quadratic CPU DoSloadNpmrcConfig() in lib/ecosystems/npmutils.jsnot stated (12.x: 12.6.0)
Super-linear YAML parsing allows CPU DoS via small lock and CI filesreadYamlFile() in lib/ecosystems/parsers-stack.jsnot stated (no match found in 12.x)
OOM crash on nested duplicate JS labels due to Babel errorRecoverybabelParserOptions() in lib/inventory/analyzer.js3.2.11
cargoCache: crate name case variants bloat the index memo (heap OOM)indexEntriesFor() in lib/ecosystems/cargoCache.js13.2.0 (no match found in 12.x)
Quadratic-time DoS in readRubyStringList via unquoted gemspec array itemsreadRubyStringList() in lib/ecosystems/rubyutils.js13.3.0 (no match found in 12.x)
GitHub Actions parser repeats workflow text per job and step: quadratic DoSparseWorkflowFile() in lib/inventory/ciParsers/githubActions.js12.3.0
Heap exhaustion in getJarClasses: 450 kB war crashes cdxgen servergetJarClasses() in lib/inventory/deps.js11.2.3
CBOM: exponential JSON.stringify in resolvedValueKey crashes the serverresolvedValueKey() in lib/inventory/analyzerScope.js12.4.0
Quadratic subspec merge in parsePodfileLock allows CPU DoSparsePodfileLock() in lib/ecosystems/parsers-misc.js11.2.1
Quadratic line-number lookup in inventory scanners allows CPU DoSlineNumberForIndex() in lib/inventory/aiCollector.js12.5.1
Decompression bomb in docker image archive extraction fills temp dirextractTar() in lib/managers/docker.js3.0.2
Crypto inventory: cubic-time if and switch narrowing stalls the servergetScopedStaticValueByName() in lib/inventory/analyzerScope.jsnot stated (12.x: 12.4.0)
Each Cargo.toml re-parses all workspace members (quadratic CPU DoS)parseCargoTomlData() in lib/ecosystems/parsers-rust.js12.3.1
Quadratic ReDoS in extractHuggingFaceReferences() during AI-BOM scansextractHuggingFaceReferences() in lib/inventory/aiCollector.js12.5.1
evinse: versionless purl copies crypto algos to every version, BOM blowupcreateEvinseFile() in lib/evinser/evinser.js13.6.0 (no match found in 12.x)
Gemfile.lock CPU DoS: long parent platform matched per native buildparseGemfileLockData() in lib/ecosystems/rubyutils.js10.1.2
Quadratic CPU in getScopedStaticValueByName() stalls CBOM scans and servergetScopedStaticValueByName() in lib/inventory/analyzerScope.jsnot stated (12.x: 12.4.0)
Terraform: quadratic BOM blowup from repeated module version constraintemitModuleComponent() in lib/ecosystems/parsers-terraform.jsnot stated (no match found in 12.x)
Quadratic list de-duplication in trimComponents and other merges (DoS)trimComponents() in lib/inventory/depsUtils.jsnot stated (12.x: 12.2.1)
Container scans re-hash a file for every link or path spelling (DoS)fileComponents() in lib/managers/binary.js11.2.3
parseGgufFilename is quadratic; a long .gguf URL stalls AI-BOM scansparseGgufPrefixTokens() in lib/parsers/gguf.js12.5.1
addMetadata rebuilds image properties per path: quadratic CPU DoSaddMetadata() in lib/cli/bomAssembly.js11.2.2
Quadratic-time DoS in analyzer.js from unneeded Babel scope trackingparseFileASTTree() in lib/inventory/analyzer.jsnot stated (no match found in 12.x)
Scala evinse: unbounded v1 slice occurrences, 325 kB repo gives 401 MB BOMfindPurlLocations() in lib/evinser/scalasem.jsnot stated (no match found in 12.x)
Quadratic ReDoS in csproj HintPath parsing (dotnetutils)extractPackageInfoFromHintPath() in lib/ecosystems/dotnetutils.js11.6.0
Gemspec file-name collision copies licenses onto unrelated gems, bloats BOMenrichGemsFromLocalCache() in lib/ecosystems/rubyutils.js12.8.3
ASAR parser accepts overlapping entries, causing quadratic CPU DoSvalidateHeaderEntry() in lib/ecosystems/asarutils.jsnot stated (12.x: 12.4.0)
Quadratic ReDoS in GitHub Actions interpolation and exfiltration regexesdetectUntrustedInterpolation() in lib/inventory/ciParsers/githubActions.js12.2.0
Quadratic path normalisation of long vcpkg .list lines blocks the serverreadVcpkgInstalledIndex() in lib/ecosystems/cppIncludeResolver.jsnot stated (no match found in 12.x)
Quadratic ReDoS in licenseFromPomComment via a jar's embedded pom.xmllicenseFromPomComment() in lib/ecosystems/ecosystems.jsnot stated (no match found in 12.x)
Swift evidence: quadratic time when description.json repeats a sourcecreateSemanticsSlices() in lib/evinser/swiftsem.js13.3.0 (no match found in 12.x)
createJavaBom: whole-tree walk per pom.xml makes Quarkus scans quadraticcreateJavaBom() in lib/cli/jvmBom.jsnot stated (no match found in 12.x)
ReDoS in TLP secret regex stalls server; also in introspect redactorredactLedgerText() in lib/core/buildLedger.js13.1.0 (no match found in 12.x)
Quadratic memory blowup in parsePkgLock binPaths crashes cdxgen serverparsePkgLock() in lib/ecosystems/parsers-js.jsnot stated (no match found in 12.x)
DoS via quadratic include-dir probing in isFirstPartyHeaderresolveCppBuildContext() in lib/ecosystems/cppBuildContext.jsnot stated (no match found in 12.x)
vcpkg .list index exhausts the heap: 1.6 MB file crashes cdxgen serverreadVcpkgInstalledIndex() in lib/ecosystems/cppIncludeResolver.jsnot stated (no match found in 12.x)
Quadratic-time DoS in XML parser via many declarationsparseDocument() in lib/parsers/xml.js13.0.0 (no match found in 12.x)
collectKosiServices cross-joins same-URL call sites: cubic-time DoScollectKosiServices() in lib/ecosystems/kosi.js13.2.0 (no match found in 12.x)
Quadratic ReDoS in gemspec requirement and platform parsingparseGemRequirement() in lib/ecosystems/rubyutils.js12.8.3
createCaxaBom re-reads app and re-merges deps per metadata file (quadratic)createCaxaBom() in lib/cli/jsBom.js13.3.0 (no match found in 12.x)
Exponential Dockerfile ARG expansion crashes cdxgen server with heap OOMsubstituteBuildArgs() in lib/ecosystems/parsers-misc.js10.9.5
Quadratic CPU in compareCmakeVersions from a long find_package versioncompareCmakeVersions() in lib/ecosystems/cmakeResolver.js13.0.0 (no match found in 12.x)
cargoCache: double-gzipped .crate bypasses 64 MiB unpack bound (OOM)readCrateArchiveEntry() in lib/ecosystems/cargoCache.jsnot stated (no match found in 12.x)
CPU DoS in parseVsixFile via many .vsixmanifest entries in a small .vsixparseVsixFile() in lib/helpers/vsixutils.jsnot stated (no match found in 12.x)
Quadratic ReDoS from unanchored purl regexes in scalasem and kosipurlPurlName() in lib/ecosystems/scalasem.js13.2.0 (no match found in 12.x)
Infinite loop on unclosed Unicode escape in ZON char literal crashes serverreadCharLiteral() in lib/ecosystems/parsers-zig.jsnot stated (no match found in 12.x)
Cubic-time DoS in Scala findPurlLocations via duplicate usedTypesfindPurlLocations() in lib/evinser/scalasem.jsnot stated (no match found in 12.x)
docker: decompression bomb in applyLayerWhiteouts exhausts memoryapplyLayerWhiteouts() in lib/managers/docker.js13.5.0 (no match found in 12.x)
ReDoS via blank lines in findStackLockFiles and similar regexesfindStackLockFiles() in lib/cli/nativeBom.js12.5.1
Quadratic CPU: oversized go.sum checksum parsed per repeated requiregoSumIntegrity() in lib/ecosystems/parsers-go.jsnot stated (no match found in 12.x)
Quadratic package.json walk up a long pod path in Podfile.lock (DoS)buildObjectForCocoaPod() in lib/ecosystems/parsers-misc.js11.2.1
ReDoS in parseCsProjAssetsData via long direct-dependency stringsparseCsProjAssetsData() in lib/ecosystems/parsers-dotnet.js9.7.2
ReDoS in parseLegacyAptRepositorySources via crafted container imageparseLegacyAptRepositorySources() in lib/managers/binary.js12.4.0
Quadratic memory use in Cargo workspace inheritance crashes the serverresolveCargoWorkspacePackageNode() in lib/ecosystems/parsers-rust.js12.3.1
Quadratic-time DoS in createRustBom via many empty .d files (--deep)createRustBom() in lib/cli/nativeBom.js10.5.2
Quadratic realpathSync on .gitmodules paths stalls cdxgen serverresolveCppBuildContext() in lib/ecosystems/cppBuildContext.jsnot stated (no match found in 12.x)
CMake variable expansion still unbounded: 10 kB file OOM-crashes cdxgencmakeFetchDependencies() in lib/parsers/cmakeLists.js13.3.0 (no match found in 12.x)
Quadratic CPU in dosai reachability: long purl re-parsed for every idresolveDosaiComponentPurl() in lib/inventory/dosaiParsers.js12.4.2
Failed image export blocks the Docker connection until cdxgen restartsstream() in lib/managers/dockerConnection.js12.7.1
Quadratic ReDoS in yarnLockToIdentMap via U+2028 in yarn.lock keysyarnLockToIdentMap() in lib/ecosystems/parsers-js.js6.0.0
cargoCache: duplicate Cargo.lock entries re-unpack the same crate (DoS)readCargoCacheMetadata() in lib/ecosystems/cargoCache.js13.4.0 (no match found in 12.x)

Impact

Hours of CPU time or exhausted memory for one scan of crafted content, which fails or hangs a CI job. The HTTP server runs parsers on the event loop, so one such scan can leave cdxgen --server unresponsive to every client, /health included, until it ends, and CDXGEN_SERVER_TIMEOUT_MS does not interrupt synchronous work. A heap exhaustion ends the process.

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 1.4.25 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. Several fixes cap the input they accept, and cdxgen now logs when data is dropped: workspace patterns (1024), cdx:npm:manifestSource (2048 characters), cdx:npm:binPaths (16384), CI step text (512), NuGet versions over 1024 characters, Dockerfile statements (4096), OpenAPI server URLs (2048), Terraform constraints and modules.json keys (1024), HintPath over 4096, C/C++ include directories (4096 searched), Rust workspace values over 4096 and crate files over 1 MiB, wheel License headers over 64 KiB (other headers 8192), YAML documents with more than 200 alias nodes. Archives are limited to 100 times their size (between 64 MiB and 8 GiB, CDXGEN_UNZIP_MAX_*), image unpacking to 100 times (at least 1 GiB), nested ASAR archives to 512, an Info.plist to 16 MiB, and at most 20 referrers are read per image. ASAR archives are named relative to the scan root with a header digest. The rule engine reports an unanswered SBOM probe as unknown, not as a CTR-009 or CTR-010 finding. The cost of crafted input at about 30 other sites that merge or re-parse lists (RRF3AYTO, BU41VJZC, KGLOFUW9) needs a shared bounded reader and is a follow-up, as are the CPU residuals P7ST7F65 (switch narrowing), H7UOFUGU (ScalaJoinIndex.narrow()) and FVVHS9WO (a shared Terraform main.tf). Babel error recovery is now off in the analyzer, so a file with a recoverable syntax error gives no JavaScript evidence. Class names are capped at 16 MiB per jar and 128 MiB per run.

Workarounds

  • Run scans of untrusted content in a job with a time limit and a memory limit, and restart the server if it stops answering.
  • Run cdxgen --server only for clients that you trust, with a process supervisor that restarts it.
  • Give the temporary directory its own quota where scans of untrusted archives run.
  • Avoid --deep, --evidence and -t cbom for untrusted repositories.
  • Scan only images from sources that you trust, or in a job with a disk quota and a time limit.

Credit

These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261117-013) and reported as ANT-2026-00EHSM43, ANT-2026-05A9RZKN, ANT-2026-0ASQCGDP, ANT-2026-0BBO8CRW, ANT-2026-0QYQ0S6B, ANT-2026-0RIDKX1M, ANT-2026-0RY9JF41, ANT-2026-0W9HLA9D, ANT-2026-11HO6X9L, ANT-2026-1DDH56CO, ANT-2026-1GK48QFT, ANT-2026-1TFJGOAI, ANT-2026-1ZE7ZY74, ANT-2026-24DML8JE, ANT-2026-25SXVNE6, ANT-2026-2DO5Z8YP, ANT-2026-324IEL1N, ANT-2026-3HC011QS, ANT-2026-3HLU1XA5, ANT-2026-3N2VWTL3, ANT-2026-3W9Y6XRK, ANT-2026-40DO58B4, ANT-2026-43A1Z8OU, ANT-2026-43DKKXRW, ANT-2026-4FV1SXBS, ANT-2026-4G089HIJ, ANT-2026-4GB4VKIK, ANT-2026-51CRIU5T, ANT-2026-51ICIFFC, ANT-2026-5OXI1IL3, ANT-2026-5QUTD1RX, ANT-2026-62Y0NK7V, ANT-2026-63VIW1LU, ANT-2026-68A7CYRZ, ANT-2026-6CLK3YHA, ANT-2026-6DUHIZW6, ANT-2026-6FG3WI9J, ANT-2026-6IZJPVXS, ANT-2026-6J1D7N10, ANT-2026-6JKLW4PY, ANT-2026-6OPEY9EY, ANT-2026-6QAMD3YH, ANT-2026-6TPPEWHS, ANT-2026-77YROUNU, ANT-2026-78MJAYX7, ANT-2026-7B2Z7BE8, ANT-2026-7PANMUD3, ANT-2026-81FG751D, ANT-2026-82LFMVW6, ANT-2026-86RXLJNB, ANT-2026-8AY4F5ST, ANT-2026-8FI5EF2K, ANT-2026-8WI1BLQ5, ANT-2026-9LKI2YV9, ANT-2026-9MWMQ5MK, ANT-2026-AOCQ8IJO, ANT-2026-AW07AE0Z, ANT-2026-B01OUJMM, ANT-2026-B5DR8ASH, ANT-2026-BAZM4ED8, ANT-2026-BDMWMM0S, ANT-2026-BU41VJZC, ANT-2026-CN9B58WS, ANT-2026-CNFV5IOY, ANT-2026-CPNYXP1Q, ANT-2026-DFG5K9F9, ANT-2026-DLO8D5JB, ANT-2026-E2RW09EL, ANT-2026-E3QLRJZV, ANT-2026-EGG7B09K, ANT-2026-EQ8JOV89, ANT-2026-F41GXNR1, ANT-2026-F4K74DU8, ANT-2026-FFRHUCO2, ANT-2026-FVVHS9WO, ANT-2026-GGYWHDAI, ANT-2026-GO6KTJCZ, ANT-2026-GRWQZ0B5, ANT-2026-H7UOFUGU, ANT-2026-HBU9720H, ANT-2026-HHVAKMS7, ANT-2026-HT9KTDCR, ANT-2026-I5QT4OCD, ANT-2026-I64K7DV7, ANT-2026-IA41FCQ2, ANT-2026-IKJSC58C, ANT-2026-IR5ZSDFI, ANT-2026-IVBDYDA5, ANT-2026-J0QEUXP9, ANT-2026-J0V6D2ZQ, ANT-2026-JJ13ENQ0, ANT-2026-JS4UD77D, ANT-2026-JXCECAR2, ANT-2026-KGLOFUW9, ANT-2026-KIWNQTHG, ANT-2026-KOWY5I40, ANT-2026-KP53Y47S, ANT-2026-L2ECHL88, ANT-2026-LA3MLJQX, ANT-2026-LD5FRZQZ, ANT-2026-LQ1YRQOL, ANT-2026-N0DFQY2D, ANT-2026-N9H1ERW0, ANT-2026-NEIBC4L6, ANT-2026-NUAFOMDI, ANT-2026-O6G7X2PD, ANT-2026-O9HLMJFT, ANT-2026-ODMI5B26, ANT-2026-OGPC2K6A, ANT-2026-P6Z4T478, ANT-2026-P7ST7F65, ANT-2026-POW80W3X, ANT-2026-QL27RV6T, ANT-2026-QOCPM2PF, ANT-2026-QQ23F79Y, ANT-2026-QZO7K8FG, ANT-2026-RGISM5WP, ANT-2026-RRF3AYTO, ANT-2026-S0IRD3JZ, ANT-2026-S6A2CW04, ANT-2026-S8BFGRY9, ANT-2026-S8XQPNVM, ANT-2026-SF4CDUOE, ANT-2026-SNPSGF73, ANT-2026-T1GGLX7Z, ANT-2026-TEV5JJ5K, ANT-2026-TILY7IN3, ANT-2026-TJRFNPY5, ANT-2026-TL94QBM4, ANT-2026-TMC9JS87, ANT-2026-TN2LNVOZ, ANT-2026-TU4LXEPW, ANT-2026-U6FK920W, ANT-2026-UMHX0MMA, ANT-2026-UMN1XHC4, ANT-2026-UQDQGTNZ, ANT-2026-UVRCX5JD, ANT-2026-UW2S36AG, ANT-2026-UXUY4VFG, ANT-2026-V8VWDLXY, ANT-2026-VGXZKGB2, ANT-2026-WVQFN7C2, ANT-2026-X4V3JYA1, ANT-2026-X4X23LBA, ANT-2026-XERCNL3V, ANT-2026-XI2Q3BPF, ANT-2026-XZALYLLC, ANT-2026-YPUHM8RT, ANT-2026-YS6PEFOH, ANT-2026-YW3TSIYM, ANT-2026-YZPWK9HC, ANT-2026-Z0JEFGY9, ANT-2026-Z1688KR4, ANT-2026-Z66AMGYV, ANT-2026-ZCT72H79, ANT-2026-ZDT7JWC0, ANT-2026-ZGE75QR2, ANT-2026-ZJH1SFTN, ANT-2026-ZODHEVLK, ANT-2026-ZQVQWOX3, and were fixed by AI agents working for the cdxgen maintainers.

References

Affected versions

References

GitHub · cdxgen/cdxgen