CVE-2026-59891

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

Published Jul 14, 2026 CVSS 3.1 · 9.6 Critical EPSS < 1% KEV · Not listed
Description
sigstore-js provides JavaScript libraries for interacting with Sigstore services. Prior to 0.7.1, getRegistryCredentials() reads credentials from the Docker config file and selects an entry by checking whether any configured auth key contains the target registry string. 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. This issue is fixed in version 0.7.1.

Analysis

AI-generated

Technical impact

The vulnerability in sigstore-js allows an attacker to read registry credentials from a Docker config file and provide them to a malicious registry through a substring match bug. When getRegistryCredentials() is called, the function examines all configured auth entries and selects one whose hostname contains the target registry string as a substring. This means credentials stored for a legitimate registry can be inadvertently chosen for a different registry whose hostname includes the legitimate hostname, exposing sensitive credentials. The CWE-522 flaw results in accidental disclosure of registry authentication data.

Affected Systems

The flaw affects the sigstore-js library, specifically versions prior to 0.7.1. The affected product is reported by the CNA as sigstore:sigstore-js, and the vulnerability was fixed in release 0.7.1. Users employing sigstore-js for interacting with Sigstore services should verify that they are on version 0.7.1 or newer, as earlier releases remain vulnerable.

Risk and Exploitability

The CVSS score of 9.6 places this vulnerability in the critical range. The EPSS score of less than 1% suggests that exploitation events are expected to remain rare, and the vulnerability is not currently listed in the CISA KEV catalog. Nonetheless, the nature of the flaw—exposing registry credentials to an attacker‑controlled registry—makes it especially dangerous for environments that rely on private container registries. An attacker could retrieve privileged credentials by directing the library to a malicious registry whose hostname contains a substring of a legitimate registry. The substring-matching logic provides a straightforward path to exploit without requiring advanced techniques, meaning the risk is high for affected deployments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade sigstore-js to version 0.7.1 or later to apply the fixed substring matching logic.
  • If upgrading is not immediately possible, modify the getRegistryCredentials implementation to enforce exact hostname matching or replace it with a trusted library that performs exact comparison.
  • Restrict the Docker configuration so that credentials are only stored for registries that do not share substrings with other registries, and routinely audit the config to ensure it contains only trusted registry entries.

Generated by OpenCVE AI on July 31, 2026 at 09:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pf56-329r-95rw Credential confusion in @sigstore/oci can leak registry credentials to an attacker-controlled registry
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description sigstore-js provides JavaScript libraries for interacting with Sigstore services. Prior to 0.7.1, getRegistryCredentials() reads credentials from the Docker config file and selects an entry by checking whether any configured auth key contains the target registry string. 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. This issue is fixed in version 0.7.1.
Title Credential confusion in  @sigstore/oci  can leak registry credentials to an attacker-controlled registry
Weaknesses CWE-522
References
Metrics cvssV3_1

{'score': 9.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'}

Subscriptions

No data.

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 21, 2026, 6:43 PM
Reserved
Jul 7, 2026, 4:40 PM
Status
Awaiting Analysis
Published
Jul 14, 2026, 5:17 PM
Modified
Oct 24, 2026, 9:10 PM