GO-2023-1704

Source
https://pkg.go.dev/vuln/GO-2023-1704
Import Source
https://vuln.go.dev/ID/GO-2023-1704.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2023-1704
Aliases
Published
2023-04-05T21:04:28Z
Modified
2024-05-20T16:03:47Z
Summary
Excessive memory allocation in net/http and net/textproto
Details

HTTP and MIME header parsing can allocate large amounts of memory, even when parsing small inputs, potentially leading to a denial of service.

Certain unusual patterns of input data can cause the common function used to parse HTTP and MIME headers to allocate substantially more memory than required to hold the parsed headers. An attacker can exploit this behavior to cause an HTTP server to allocate large amounts of memory from a small request, potentially leading to memory exhaustion and a denial of service.

With fix, header parsing now correctly allocates only the memory required to hold parsed headers.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2023-1704"
}
References
Credits
    • Jakob Ackermann (@das7pad)

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.19.8
Introduced
1.20.0-0
Fixed
1.20.3

Ecosystem specific

{
    "imports": [
        {
            "path": "net/textproto",
            "symbols": [
                "Reader.ReadMIMEHeader",
                "Reader.upcomingHeaderNewlines",
                "readMIMEHeader"
            ]
        }
    ]
}