GO-2022-0520

Source
https://pkg.go.dev/vuln/GO-2022-0520
Import Source
https://vuln.go.dev/ID/GO-2022-0520.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0520
Aliases
Published
2022-07-28T17:23:05Z
Modified
2024-05-20T16:03:47Z
Summary
Exposure of client IP addresses in net/http
Details

Client IP adresses may be unintentionally exposed via X-Forwarded-For headers.

When httputil.ReverseProxy.ServeHTTP is called with a Request.Header map containing a nil value for the X-Forwarded-For header, ReverseProxy sets the client IP as the value of the X-Forwarded-For header, contrary to its documentation.

In the more usual case where a Director function sets the X-Forwarded-For header value to nil, ReverseProxy leaves the header unmodified as expected.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2022-0520"
}
References
Credits
    • Christian Mehlmauer

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.17.12
Introduced
1.18.0-0
Fixed
1.18.4

Ecosystem specific

{
    "imports": [
        {
            "path": "net/http",
            "symbols": [
                "Header.Clone"
            ]
        }
    ]
}