IPv6 Zone ID Vulnerability in Go's Standard Library: Bypassing URI Name Constraints

stdlib Updated 02 Oct 2025

Summary

28/01/2025
Yes i
Unrated
Not published

CVE-2024-45341: Usage of IPv6 zone IDs can bypass URI name constraints in crypto/x509. Affects stdlib across 3 version ranges.

< 1.22.11 >= 1.23.0-0, < 1.23.5 >= 1.24.0-0, < 1.24.0-rc.2

Fixed in 1.22.11, 1.23.5 or 1.24.0-rc.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2024-45341 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Go standard library is a collection of packages that provide essential functionalities for Go applications, including cryptographic operations and certificate handling. The 'crypto/x509' package is specifically designed for managing X.509 certificates, which are widely used for secure communications. However, a recent vulnerability has been identified that allows the use of IPv6 zone IDs in URIs, potentially bypassing URI name constraints, which can lead to security issues in private PKIs.

Vulnerability Detail

The vulnerability arises from the handling of URIs that contain IPv6 addresses with zone IDs. This can lead to a situation where a certificate with such a URI incorrectly satisfies a URI name constraint that is supposed to apply to the certificate chain. This issue is particularly concerning for users of private PKIs that utilize URIs, as it can undermine the integrity of certificate validation processes, potentially allowing unauthorized access or man-in-the-middle attacks.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.22.11 1.22.11
    go get stdlib@v1.22.11
  • >= 1.23.0-0, < 1.23.5 1.23.5
    go get stdlib@v1.23.5
  • >= 1.24.0-0, < 1.24.0-rc.2 1.24.0-rc.2
    go get stdlib@v1.24.0-rc.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, avoid using URIs with IPv6 addresses that include zone IDs in your private PKI setup until the library can be updated. Additionally, consider implementing stricter validation checks on URIs to mitigate the risk of bypassing name constraints.

Conclusion

The identified vulnerability in the Go standard library's 'crypto/x509' package poses significant risks for private PKIs by allowing IPv6 zone IDs to bypass URI name constraints. It is crucial for users to update to the patched versions of the library and implement recommended workarounds to mitigate potential security threats.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

The vulnerability can allow unauthorized certificates to be accepted in private PKIs, potentially leading to security breaches.

Users of private PKIs that utilize URIs in their certificate chains are primarily affected.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Implement stricter validation checks on URIs and avoid using IPv6 addresses with zone IDs in your certificates as a temporary measure.

No, this vulnerability primarily affects private PKIs, as certificates containing URIs are not permitted in the web PKI.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.22.11 1.22.11
    go get stdlib@v1.22.11
  • >= 1.23.0-0, < 1.23.5 1.23.5
    go get stdlib@v1.23.5
  • >= 1.24.0-0, < 1.24.0-rc.2 1.24.0-rc.2
    go get stdlib@v1.24.0-rc.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback