Server mode: clients can obtain host inventories that the host-scope refusal should block
Description
cdxgen --server refuses project types that inventory the server host itself, such as os and hbom, unless the server was started with them. Three kinds of request still return information about the server host to any client that can reach it: a project type in a different letter case, a C/C++ scan, and a scan that asks for the crypto inventory on a server that collects formulation.
Details
- Letter case.
validateRequestOptions()inlib/server/server.jstests the requested types against the lower-caseHOST_SCOPE_PROJECT_TYPESset using the request's own spelling, while the dispatch to the HBOM collector lower-cases them.type=HBOMtherefore returns the server's hardware inventory: system, BIOS and chassis details, CPU model and flags, memory size, block devices, network interface names, PCI devices with drivers and the OS version. Each request also runs the collector's fixed set of host utilities. In secure mode the HBOM collector's own preflight aborts the request. - C/C++ scans. The C/C++ types (
c,cpp,c++,conan,cmake,meson,vcpkg,collider) are not host-scope types, but once the scanned tree holds any C/C++ source,createCppBom()inlib/cli/nativeBom.jsqueries the server's deb, rpm or portage database through osquery for packages whose names containdevorheaderand runsdpkg --listfilesfor each.getCppModules()then copies name, distribution version, architecture, distribution release, maintainer and owned file paths of those host packages into the BOM. - Crypto inventory through formulation. On a server started with
--include-formulation(and without--include-crypto) where the osquery plugin is installed, a request withincludeCrypto=trueorprofile=researchmakesaddFormulationSection()inlib/inventory/formulationParsers.jsruncollectOSCryptoLibs(). The response lists the host's TLS and crypto packages with versions, every certificate in its store, and yum repository definitions, including anyuser:password@in abaseurl.includeCryptois a request parameter the server accepts, and the host-scope check covers only project types.
Impact
Unauthenticated clients of the server learn the server host's hardware, development packages, crypto libraries and certificates, and in rare configurations repository credentials. This matters where the operator relies on the refusal, typically together with CDXGEN_SERVER_ALLOWED_PATHS.
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 from 10.0.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.
First affected release of each issue:
- letter case of the project type: 13.5.0, and 12.8.7 on the 12.x line
- C/C++ scans: 13.5.0, and 12.8.7 on the 12.x line
- crypto inventory through formulation: 10.0.0
Workarounds
- Put the server behind a reverse proxy that authenticates clients and rejects the
includeCryptoandprofileparameters and host-scope types in any letter case. - Do not start servers that untrusted clients can reach with
--include-formulation. - Run the server in a container whose host inventory is not sensitive.
Credit
These issues were found by Anthropic's OSS Scanner (scan cdxgen-20261108-009) and reported as ANT-2026-7KU8K4VL, ANT-2026-5GD33W48, ANT-2026-FYM8H9JX.
References
- github.com/
cdxgen/ cdxgen/ security/ advisories/ GHSA-259h-c659-9x53 (earlier server-mode advisory that introduced the host-scope refusal) - 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