@cyclonedx/cdxgen: Docker registry auth substring match forwards credentials to a different registry
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
Affected software
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.