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

Published Jun 5, 2025
·
Updated

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.

Other sources

Usage of ExtKeyUsageAny disables policy validation in crypto/x509

Microsoft

Affected Software

5 affected componentsFixes available
go Go<1.24.4, <1.23.10
IBM Concert Software<=1.0.0-2.2.0
Microsoft cbl2 msft-golang 1.24.1-3<1.24.1-3
1.24.1-3
Microsoft azl3 golang 1.24.6-1<1.24.4-1
1.24.4-1
Microsoft cm2 msft-golang 1.24.1-3<1.24.1-3
1.24.1-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.24.1-3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.24.4-1
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.24.4
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.23.10
  5. Configuration

    Do not set VerifyOptions.KeyUsages to include ExtKeyUsageAny, since it disables policy validation in crypto/x509; instead use specific KeyUsage/ExtKeyUsage values appropriate for the certificates you expect.

    Go crypto/x509 (VerifyOptions.KeyUsages) VerifyOptions.KeyUsages includes ExtKeyUsageAny = Do not include ExtKeyUsageAny

Event History

Jun 11, 2025
CVE Published
via MITRE·04:42 PM
Data Sourced
via MITRE·04:42 PM
DescriptionWeakness
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·05:15 PM
DescriptionSeverity
Jul 11, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Mar 23, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-22874?

CVE-2025-22874 is considered a moderate severity vulnerability due to its impact on policy validation in certain certificate chains.

2

How do I fix CVE-2025-22874?

To mitigate CVE-2025-22874, update your Google Go version to the latest release that addresses this vulnerability.

3

What versions of Google Go are affected by CVE-2025-22874?

CVE-2025-22874 affects certain versions of Google Go that use Verify with a VerifyOptions.KeyUsages setting containing ExtKeyUsageAny.

4

What type of certificates does CVE-2025-22874 affect?

CVE-2025-22874 primarily affects certificate chains that contain policy graphs, which are uncommon.

5

Is policy validation still functional for certificates not affected by CVE-2025-22874?

Yes, policy validation remains functional for certificates that do not utilize the ExtKeyUsageAny in their configurations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203