Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @cyclonedx/cdxgen
  4. ›
  5. GHSA-qhh4-458h-xwh2

GHSA-qhh4-458h-xwh2: @cyclonedx/cdxgen: Docker registry auth substring match forwards credentials to a different registry

May 8, 2026

When cdxgen scans or pulls container images through the Docker daemon API, it builds an X-Registry-Auth header from Docker credentials in DOCKER_CONFIG/config.json. The credential selection logic matches configured registry keys with substring checks:

if (forRegistry && !serverAddress.includes(forRegistry)) {
continue;
}

This is not an origin-safe registry comparison. For example, credentials configured for private-registry.example.com are selected for a requested image under registry.example.com, because:

"private-registry.example.com".includes("registry.example.com") === true

The selected credentials are then serialized into X-Registry-Auth for the Docker API pull request targeting the requested registry.

References

  • github.com/advisories/GHSA-qhh4-458h-xwh2
  • github.com/cdxgen/cdxgen
  • github.com/cdxgen/cdxgen/security/advisories/GHSA-qhh4-458h-xwh2

Code Behaviors & Features

Detect and mitigate GHSA-qhh4-458h-xwh2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 9.9.5 before 12.3.3

Fixed versions

  • 12.3.3

Solution

Upgrade to version 12.3.3 or above.

Impact 7.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-346: Origin Validation Error
  • CWE-522: Insufficiently Protected Credentials

Source file

npm/@cyclonedx/cdxgen/GHSA-qhh4-458h-xwh2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:18:59 +0000.