GO-2024-2600

Source
https://pkg.go.dev/vuln/GO-2024-2600
Import Source
https://vuln.go.dev/ID/GO-2024-2600.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2024-2600
Aliases
Published
2024-03-05T22:15:02Z
Modified
2024-10-15T05:42:09.009946Z
Summary
Incorrect forwarding of sensitive headers and cookies on HTTP redirect in net/http
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.

References
Credits
    • Juho Nurminen of Mattermost

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.21.8
Introduced
1.22.0-0
Fixed
1.22.1

Ecosystem specific

{
    "imports": [
        {
            "path": "net/http",
            "symbols": [
                "Client.Do",
                "Client.Get",
                "Client.Head",
                "Client.Post",
                "Client.PostForm",
                "Get",
                "Head",
                "Post",
                "PostForm",
                "isDomainOrSubdomain"
            ]
        },
        {
            "path": "net/http/cookiejar",
            "symbols": [
                "Jar.Cookies",
                "Jar.SetCookies",
                "isIP"
            ]
        }
    ]
}