Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @sigstore/oci
  4. ›
  5. CVE-2026-59891

CVE-2026-59891: Credential confusion in @sigstore/oci can leak registry credentials to an attacker-controlled registry

July 21, 2026

This is a credential-exposure / credential-confusion issue.

getRegistryCredentials() reads credentials from the Docker config file (~/.docker/config.json) and selects an entry by checking whether any configured auth key contains the target registry string:

Object.keys(dockerConfig.auths || {}).find((key) => key.includes(registry))

Because this is a substring match rather than an exact host match, credentials configured for one registry can be selected for — and transmitted to — a different registry whose hostname has a substring relationship with a configured auth key (for example, an attacker-controlled cr.io matches a configured ghcr.io).

Who is impacted: Any consumer of @sigstore/oci that uploads artifacts to an OCI registry using credentials from a Docker config, where the destination registry/image reference can be influenced by an untrusted party. This includes @actions/attest and the actions/attest, actions/attest-build-provenance, and actions/attest-sbom GitHub Actions when run with push-to-registry: true, where the subject-name input determines the destination registry.

This is classified as a critical vulnerability given the potential, in a theoretical worst-case scenario, to expose long-lived registry credentials. However, in practice, exploitation requires all of the following:

  • The Docker config on the host contains credentials for a registry.
  • The destination registry/image reference is influenced by an untrusted source.
  • The attacker controls a registry whose hostname is a substring of (or is otherwise contained within) a configured Docker auth key.

Under those conditions, registry credentials present on the host (e.g. a GHCR, Docker Hub, or cloud-registry token) can be sent to an attacker-controlled registry during the authentication exchange.

References

  • github.com/advisories/GHSA-pf56-329r-95rw
  • github.com/sigstore/sigstore-js/commit/85c58380758b97ce1b74ef470e55cc21f9d3aa89
  • github.com/sigstore/sigstore-js/releases/tag/%40sigstore%2Foci%400.7.1
  • github.com/sigstore/sigstore-js/security/advisories/GHSA-pf56-329r-95rw
  • nvd.nist.gov/vuln/detail/CVE-2026-59891

Code Behaviors & Features

Detect and mitigate CVE-2026-59891 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.7.1

Fixed versions

  • 0.7.1

Solution

Upgrade to version 0.7.1 or above.

Impact 9.6 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-522: Insufficiently Protected Credentials

Source file

npm/@sigstore/oci/CVE-2026-59891.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:17:25 +0000.