CVE-2025-22874
Go vulnerability analysis and mitigation

Overview

CVE-2025-22874 is a certificate policy validation bypass vulnerability in the Go standard library's crypto/x509 package. When Verify is called with a VerifyOptions.KeyUsages containing ExtKeyUsageAny, policy validation is unintentionally disabled, affecting only certificate chains that contain policy graphs. The vulnerability was published on June 11, 2025, and affects Go versions prior to 1.23.10 and 1.24.0–1.24.3 (fixed in 1.24.4). It carries a CVSS v3.1 base score of 7.5 (High) (Go Vuln DB, Oracle Advisory).

Technical details

The root cause is improper enforcement of certificate policy constraints (CWE-295: Improper Certificate Validation) within Go's crypto/x509 package. When VerifyOptions.KeyUsages includes the ExtKeyUsageAny value, the certificate verification logic inadvertently skips policy graph validation — a code path that should still enforce policy constraints regardless of key usage settings. This is a logic flaw rather than a memory safety issue; an attacker positioned to present a certificate chain with policy graphs could exploit this to have an otherwise-invalid certificate accepted as valid. The fix was committed to the Go repository and announced via the golang-announce mailing list (Go Issue, Go CL, golang-announce).

Impact

Successful exploitation allows an attacker to bypass certificate policy validation in applications built with vulnerable versions of Go's crypto/x509 package, potentially enabling the use of incorrectly issued or unauthorized certificates. This primarily affects integrity — an attacker could present a certificate that should be rejected due to policy constraints and have it accepted, undermining certificate-based authentication and secure communications. Confidentiality and availability are not directly impacted, but the integrity bypass could facilitate man-in-the-middle attacks or impersonation in systems relying on certificate policy enforcement (Go Vuln DB, Oracle Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of this report. The EPSS score is approximately 0.017%, reflecting a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is further constrained by the requirement that the target application must use ExtKeyUsageAny in its verification options and process certificate chains containing policy graphs, which are uncommon in practice (Go Vuln DB).

Mitigation and workarounds

The Go project has released patched versions addressing this vulnerability: Go 1.23.10 and Go 1.24.4 or later. All applications built with affected versions of the crypto/x509 package should be recompiled using a patched Go toolchain. As a temporary workaround, avoid using ExtKeyUsageAny in VerifyOptions.KeyUsages where certificate policy validation is required. Downstream distributions including Arch Linux, openSUSE, Mageia, Oracle Linux, and Amazon Linux 2 have also released updated packages (Go Vuln DB, golang-announce, Oracle Advisory).

Community reactions

The Go team disclosed the vulnerability via the golang-announce mailing list and the official Go vulnerability database on June 11, 2025, with a corresponding Bluesky post from the golang.org account. The vulnerability appeared in community CVE tracking threads on Reddit (r/CVEWatch) and was covered by SecurityOnline.info. Downstream Linux distributions and cloud vendors (Oracle, Amazon, Arch Linux, openSUSE, Mageia, Splunk, IBM, Broadcom) issued their own advisories and package updates in the weeks following disclosure (golang-announce, SecurityOnline).

Additional resources


SourceThis report was generated using AI

Related Go vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2023-54365HIGH8.7
  • Go logoGo
  • trigger-dev
NoYesJun 23, 2026
CVE-2026-39822HIGH7.8
  • Go logoGo
  • kube-bench-fips
NoYesJul 08, 2026
CVE-2026-42504HIGH7.5
  • Go logoGo
  • commercial-expanso-edge
NoYesJun 02, 2026
CVE-2026-42505MEDIUM5.3
  • Go logoGo
  • kapacitor-fips-1.7
NoYesJul 08, 2026
CVE-2026-42507MEDIUM5.3
  • Go logoGo
  • authentik-fips-2025.12
NoYesJun 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management