CVE-2025-4673: Go Standard Library net/http Sensitive Header Leak on Cross-Origin Redirects
Summary
CVE-2025-4673: Sensitive headers not cleared on cross-origin redirect in net/http. Affects stdlib across 2 version ranges.
< 1.23.10
>= 1.24.0-0, < 1.24.4
Fixed in 1.23.10 or 1.24.4, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2025-4673 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, particularly the net/http package, provides essential functionalities for HTTP client and server implementations. It allows developers to create robust web applications by handling HTTP requests and responses efficiently. However, the package has been found to have a vulnerability that can lead to sensitive information leakage during cross-origin redirects.
Vulnerability Detail
The vulnerability arises from the failure to clear sensitive headers, specifically Proxy-Authorization and Proxy-Authenticate, during cross-origin redirects. This oversight can potentially expose sensitive information to unintended parties, as these headers may contain authentication credentials. The issue is particularly concerning for applications that rely on proxy servers for network requests, as it can lead to unauthorized access and data breaches.
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.23.101.23.10go get stdlib@v1.23.10 -
>= 1.24.0-0, < 1.24.41.24.4go get stdlib@v1.24.4
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, developers can manually clear sensitive headers before making cross-origin requests. This can be achieved by implementing a custom HTTP client that overrides the default behavior of the net/http package. Below is an example code snippet:
package main
import (
"net/http"
)
func customClient() *http.Client {
return &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
},
}
}
func main() {
client := customClient()
req, _ := http.NewRequest("GET", "http://example.com", nil)
req.Header.Del("Proxy-Authorization")
req.Header.Del("Proxy-Authenticate")
client.Do(req)
}
Conclusion
The CVE-2025-4673 vulnerability in the Go Standard Library's net/http package poses a significant risk of sensitive information leakage through cross-origin redirects. It is crucial for developers to update to the latest patched versions or implement workarounds to mitigate this risk.
See every vulnerability recorded for stdlib →
FAQ
CVE-2025-4673 is a vulnerability in the Go Standard Library's net/http package that allows sensitive headers to persist during cross-origin redirects, potentially leaking sensitive information.
The vulnerability affects versions prior to 1.23.10 and 1.24.4. Users are advised to upgrade to these versions or later.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Proxy-Authorization and Proxy-Authenticate headers are used in HTTP requests to provide authentication credentials to proxy servers. If not cleared, they can expose sensitive information.
If an immediate upgrade is not possible, implement a workaround by manually clearing sensitive headers in your HTTP requests as shown in the provided code snippet.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.