# CVE-2025-24976: Distribution's token authentication allows attacker to inject an untrusted signing key in a JWT

- Severity: Medium 6.6 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 32% of CVEs (2026-12-01)
- Published: 2025-02-11T15:48:59.700Z
- Modified: 2026-06-17T08:59:54.903Z
- Also known as: GO-2025-3460, GHSA-phw4-mc57-4hwc
- Related: CGA-96m3-mr7p-mx3f
- Weaknesses: CWE-639
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

Distribution is a toolkit to pack, ship, store, and deliver container content. Systems running registry versions 3.0.0-beta.1 through 3.0.0-rc.2 with token authentication enabled may be vulnerable to an issue in which token authentication allows an attacker to inject an untrusted signing key in a JSON web token (JWT). The issue lies in how the JSON web key (JWK) verification is performed. When a JWT contains a JWK header without a certificate chain, the code only checks if the KeyID (`kid`) matches one of the trusted keys, but doesn't verify that the actual key material matches. A fix for the issue is available at commit 5ea9aa028db65ca5665f6af2c20ecf9dc34e5fcd and expected to be a part of version 3.0.0-rc.3. There is no way to work around this issue without patching if the system requires token authentication.

(As written by CVE List.)

## Affected

- distribution distribution: >= 3.0.0-beta.1, <= 3.0.0-rc.2
- github.com/distribution/distribution (Go): all versions

## References

- <https://github.com/distribution/distribution/security/advisories/GHSA-phw4-mc57-4hwc> (advisory)
- <https://github.com/distribution/distribution/commit/f4a500caf68169dccb0b54cb90523e68ee1ac2be>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-24976> (advisory)
- <https://github.com/distribution/distribution/commit/5ea9aa028db65ca5665f6af2c20ecf9dc34e5fcd> (fix)

## Sources

- CVE List: [CVE-2025-24976](https://www.cve.org/CVERecord?id=CVE-2025-24976), CVE Terms of Use, modified 2026-01-23
- Go Vulnerability Database: [GO-2025-3460](https://pkg.go.dev/vuln/GO-2025-3460), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2025-24976](https://nvd.nist.gov/vuln/detail/CVE-2025-24976), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-24976 · Whole record: https://cve.day/CVE-2025-24976.json · Rebuilt by cve.day 2026-11-25T22:58:53.960Z
