IPv6 Zone ID Vulnerability in Go's Standard Library: Bypassing URI Name Constraints
Summary
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
- golang · Bitnami
- golang-1.15 · Debian:11
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.
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.
No signup required · Results in about 60 seconds
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.111.22.11go get stdlib@v1.22.11 -
>= 1.23.0-0, < 1.23.51.23.5go get stdlib@v1.23.5 -
>= 1.24.0-0, < 1.24.0-rc.21.24.0-rc.2go 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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.