CVE-2025-22874 Usage of ExtKeyUsageAny disables policy validation in crypto/x509

High 7.5 Published Updated

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.

PackageAffectedFixed in
golang BitnamiFrom 1.24.0-01.24.4
stdlib GoFrom 1.24.0-01.24.4
Linux distribution packages (3)
minio-client openSUSE:TumbleweedAll versions20250721T052808Z-1.1
nova openSUSE:TumbleweedAll versions3.11.4-1.1
polaris openSUSE:TumbleweedAll versions9.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.

Is CVE-2025-22874 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free