What’s Vulnerable › Vulnerabilities
CVE-2025-22865: ParsePKCS1PrivateKey panic with partial keys in crypto/x509
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-01-28 · updated 2026-06-17
Description
Using ParsePKCS1PrivateKey to parse a RSA key that is missing the CRT values would panic when verifying that the key is well formed.
Affected products
- Go standard library crypto/x509: from 1.24.0-0 before 1.24.0-rc.2 — fixed in 1.24.0-rc.2
How to fix
Upgrade to a fixed version: Go standard library crypto/x509 1.24.0-rc.2. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/643098
- https://go.dev/issue/71216
- https://groups.google.com/g/golang-dev/c/CAWXhan3Jww/m/bk9LAa-lCgAJ
- https://pkg.go.dev/vuln/GO-2025-3421
Get alerted when CVE-2025-22865 or the next vulnerability affects your stack