CVE-2025-4673: Go Standard Library net/http Sensitive Header Leak on Cross-Origin Redirects

stdlib Updated 02 Oct 2025

Summary

11/06/2025
Yes i
Unrated
Not published

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

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.

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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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.10 1.23.10
    go get stdlib@v1.23.10
  • >= 1.24.0-0, < 1.24.4 1.24.4
    go 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

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.10 1.23.10
    go get stdlib@v1.23.10
  • >= 1.24.0-0, < 1.24.4 1.24.4
    go 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 →

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