VDB
Sign up
MEDIUM4.3

GO-2024-2600

Incorrect forwarding of sensitive headers and cookies on HTTP redirect in net/http

Quick fix

GO-2024-2600 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.21.8

Details

When following an HTTP redirect to a domain which is not a subdomain match or exact match of the initial domain, an http.Client does not forward sensitive headers such as "Authorization" or "Cookie". For example, a redirect from foo.com to www.foo.com will forward the Authorization header, but a redirect to bar.com will not.

A maliciously crafted HTTP redirect could cause sensitive headers to be unexpectedly forwarded.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.21.8
Fixgo get stdlib@v1.21.8

References