🛡️ CVE-2026-59891 — oci
Description
Credential confusion in @sigstore/oci can leak registry credentials to an attacker-controlled registry
Impact
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:
```js
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.
Patches
Fixed in @sigstore/[email protected]. Credential selection now requires an exact host match: both the target registry and each Docker auth key are canonicalized — stripping any https?:// scheme and path and normalizing the Docker Hub aliases (index.docker.io / registry-1.docker.io / docker.io) — and compared for equality. When no exact match exists, credential lookup now fails rather than falling back to an unrelated credential.
- Affected versions:
<= 0.7.0(all releases from0.1.0). - Patched version:
0.7.1.
Downstream consumers should pick up the patched @sigstore/oci; subsequent releases of @actions/attest and the actions/attest* GitHub Actions will bundle the fix.
Workarounds
- Treat the destination registry/image reference as trusted input — do not allow untrusted sources to influence the registry/image reference passed to
@sigstore/oci(or thesubject-nameofactions/attest*whenpush-to-registry: true). - Limit the credentials available in the host's Docker config to only those required for the operation, and avoid authenticating to registries whose hostnames have substring relationships with potential untrusted destinations.
- Scope registry tokens narrowly and prefer short-lived credentials.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity high, availability high.
Weakness class
CVE-2026-59891 is classified as CWE-522: Insufficiently Protected Credentials. Credentials are stored or transmitted with protection too weak for what they unlock.
Affected software
CVE-2026-59891 is recorded against 2 packages.
- @sigstore/oci
- unknown
Timeline and source
Published on 21 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
github.com (Web)
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| @sigstore/oci | — | — |
| unknown | — | — |
References
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Exploit Protection
Are you running oci?
CVE-2026-59891 carries CVSS 9.6 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-59891 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.