VDB
Sign up
MEDIUM5.9

GO-2026-6859

HTTP/1 server crash due to MaxBytesReader header race in net/http

Quick fix

GO-2026-6859 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.26.11

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.26.11
Fixgo get stdlib@v1.26.11

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:golang/stdlib"]}'