Skip to main content

@cyclonedx/cdxgen: Docker registry auth substring match forwards credentials to a different registry

0
High
Published: 08/13/2026 (08/13/2026, 16:39:03 UTC)
Source: GCVE Database
Product: cdxgen

Description

The npm package @cyclonedx/cdxgen versions 9.9.5 up to but not including 12.3.3 contains a vulnerability where Docker registry credentials can be forwarded incorrectly due to substring matching of registry hostnames. This causes credentials intended for one private registry to be sent to a different registry whose hostname is a substring of the private registry's hostname. This misbinding of credentials can expose private registry credentials to unintended registries during Docker image pulls via the Docker daemon API.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N

Affected software

Homebrewmore threats →ghsa
cdxgen
pkg:brew/cdxgen
Affected versions
>=9.9.5 <12.3.3

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/22/2026, 17:35:40 UTC

Technical Analysis

The vulnerability in @cyclonedx/cdxgen arises from its Docker registry authentication logic, which uses substring matching to select credentials from the Docker config file. Specifically, when building the X-Registry-Auth header for Docker API requests, the code checks if the configured registry key includes the requested registry hostname as a substring, which is not a secure origin check. For example, credentials for 'private-registry.example.com' are incorrectly matched and forwarded when pulling images from 'registry.example.com' because the former includes the latter as a substring. This leads to private registry credentials being sent to a different registry, potentially exposing sensitive authentication data. The issue affects versions from 9.9.5 up to but excluding 12.3.3. A fix has been implemented by adding strict host matching functions to prevent this substring-based misbinding.

Potential Impact

This vulnerability can cause private Docker registry credentials to be sent to a different registry during image pulls, potentially exposing sensitive credentials to unauthorized parties. An attacker controlling or observing the target registry can induce a victim to scan images from that registry, causing the victim's private registry credentials to be forwarded in the Docker API request. This credential forwarding undermines the confidentiality of private registry credentials and can lead to unauthorized access if those credentials are intercepted or misused.

Mitigation Recommendations

An official fix is available and has been implemented in @cyclonedx/cdxgen by introducing strict host matching to replace the insecure substring matching logic. Users should upgrade to version 12.3.3 or later to remediate this vulnerability. Until upgraded, users should be aware of the risk of credential misbinding when scanning images from registries with hostnames that are substrings of private registries. No other mitigations are specifically recommended by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-cdxgen-GHSA-qhh4-458h-xwh2
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
4.0

Threat ID: 6ada44fb4d27ba8daa6a5a5f

Added to database: 10/22/2026, 17:16:43 UTC

Last enriched: 10/22/2026, 17:35:40 UTC

Last updated: 10/22/2026, 17:35:40 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses