Sensitive Header Exposure in Go's net/http Package - GO-2025-3420
Summary
CVE-2024-45336: Sensitive headers incorrectly sent after cross-domain redirect in net/http. 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-45336 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 net/http package in Go is a core library that provides HTTP client and server implementations. It is widely used for building web applications and services, allowing developers to send and receive HTTP requests and responses. The package is designed for simplicity and efficiency, making it a popular choice among Go developers. However, it has a vulnerability that affects how sensitive headers are handled during cross-domain redirects, potentially exposing sensitive information.
Vulnerability Detail
The vulnerability arises from the way the HTTP client in Go handles sensitive headers during cross-domain redirects. When a request containing sensitive headers, such as Authorization, is redirected to a different domain, the client drops these headers. This means that if a request is made to a.com and is redirected to b.com, the Authorization header will not be sent to b.com. However, if there is a subsequent same-domain redirect, the sensitive headers are restored, which can lead to unintended exposure of sensitive information to the wrong domain. This behavior can be exploited by attackers to gain unauthorized access to resources.
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 sending sensitive headers in requests that may be redirected to different domains. Instead, consider using alternative authentication methods that do not rely on sensitive headers, or implement additional checks to ensure that sensitive information is only sent to trusted domains.
Conclusion
The GO-2025-3420 vulnerability in the net/http package of Go highlights a critical issue regarding the handling of sensitive headers during cross-domain redirects. Developers should take immediate action to update their packages to the patched versions to mitigate potential security risks. Additionally, implementing workarounds can help protect sensitive information until updates are applied.
See every vulnerability recorded for stdlib →
FAQ
The vulnerability involves the incorrect handling of sensitive headers during cross-domain redirects in the net/http package.
If your application relies on sensitive headers for authentication or authorization, this vulnerability could expose those headers to unintended domains, leading to potential security breaches.
The vulnerability affects all versions prior to 1.22.11, 1.23.5, and 1.24.0-rc2.
Yes, you can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.
If you cannot update the package immediately, implement workarounds such as avoiding the use of sensitive headers in cross-domain requests until you can apply the necessary updates.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.