CVE-2025-22874 Usage of ExtKeyUsageAny disables policy validation in crypto/x509
Attackers can bypass certificate policy validation in Go applications by using ExtKeyUsageAny, potentially accepting invalid certificates.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-22874?
CVE-2025-22874 is a high-severity vulnerability in Go standard library crypto/x509, published on 11 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Calling Verify with a VerifyOptions.KeyUsages that contains ExtKeyUsageAny unintentionally disabledpolicy validation. This only affected certificate chains which contain policy graphs, which are rather uncommon.
Which versions are affected by CVE-2025-22874?
2 open source packages ship an affected version, including golang and stdlib.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | From 1.24.0-0 | 1.24.4 |
stdlib Go | From 1.24.0-0 | 1.24.4 |
Linux distribution packages (3)
minio-client openSUSE:Tumbleweed | All versions | 20250721T052808Z-1.1 |
nova openSUSE:Tumbleweed | All versions | 3.11.4-1.1 |
polaris openSUSE:Tumbleweed | All versions | 9.6.4-1.1 |
How do I fix CVE-2025-22874?
Upgrade golang to 1.24.4 or later.
Is CVE-2025-22874 being exploited?
There is no known exploitation of CVE-2025-22874 in the wild and no public exploit code.
Sources
Also known as AZL-63872, AZL-72104, AZL-78986, AZL-98865, BELL-CVE-2025-22874, BIT-golang-2025-22874 and 54 more.