HTTP/1 server crash due to MaxBytesReader header race in net/http
For HTTP/1 servers, when MaxBytesReader's limit is exceeded, "Connection: close" header is automatically set without synchronization, which might race with another header being set explicitly in the server handler. As a result, an HTTP/1 server that utilizes MaxBytesReader or MaxBytesHandler can crash due to runtime panic if its handler reads the request body concurrently with writing the response header.
Recorded fixes — stdlib: 1.26.11 or 1.27.4. Check your release branch.
Exploitation not established
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 1.26.11Semantic versions | 1.26.11 |
| From 1.27.0-0 before 1.27.4Semantic versions | 1.27.4 |
Version evidence: OSV · GO-2026-6859
View original version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.26.11"
},
{
"introduced": "1.27.0-0"
},
{
"fixed": "1.27.4"
}
],
"type": "SEMVER"
}
],
"versions": []
}