Vulnerability Report: GO-2026-6859
- CVE-2026-97054
- Affects: net/http
- Published: Nov 11, 2026
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.
Affected Packages
-
PathVersionsSymbols
-
before go1.26.11, from go1.27.0-0 before go1.27.4
87 affected symbols
- CanonicalHeaderKey
- Client.CloseIdleConnections
- Client.Do
- Client.Get
- Client.Head
- Client.Post
- Client.PostForm
- ClientConn.Close
- ClientConn.RoundTrip
- Cookie.String
- Cookie.Valid
- CrossOriginProtection.AddInsecureBypassPattern
- CrossOriginProtection.AddTrustedOrigin
- CrossOriginProtection.Check
- Dir.Open
- Error
- Get
- Handle
- HandleFunc
- HandlerFunc.ServeHTTP
- Head
- Header.Add
- Header.Del
- Header.Get
- Header.Set
- Header.Values
- Header.Write
- Header.WriteSubset
- ListenAndServe
- ListenAndServeTLS
- NewRequest
- NewRequestWithContext
- NotFound
- ParseCookie
- ParseSetCookie
- ParseTime
- Post
- PostForm
- ProxyFromEnvironment
- ReadRequest
- ReadResponse
- Redirect
- Request.AddCookie
- Request.BasicAuth
- Request.Cookie
- Request.Cookies
- Request.CookiesNamed
- Request.FormFile
- Request.FormValue
- Request.MultipartReader
- Request.ParseForm
- Request.ParseMultipartForm
- Request.PostFormValue
- Request.Referer
- Request.SetBasicAuth
- Request.UserAgent
- Request.Write
- Request.WriteProxy
- Response.Cookies
- Response.Location
- Response.Write
- ResponseController.EnableFullDuplex
- ResponseController.Flush
- ResponseController.Hijack
- ResponseController.SetReadDeadline
- ResponseController.SetWriteDeadline
- Serve
- ServeContent
- ServeFile
- ServeFileFS
- ServeMux.Handle
- ServeMux.HandleFunc
- ServeMux.ServeHTTP
- ServeTLS
- Server.Close
- Server.ListenAndServe
- Server.ListenAndServeTLS
- Server.Serve
- Server.ServeTLS
- Server.SetKeepAlivesEnabled
- Server.Shutdown
- SetCookie
- Transport.CancelRequest
- Transport.Clone
- Transport.CloseIdleConnections
- Transport.NewClientConn
- Transport.RoundTrip
Aliases
References
- https://go.dev/cl/862185
- https://go.dev/issue/82563
- https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM
- https://vuln.go.dev/ID/GO-2026-6859.json
Credits
- Jakub Ciolek (https://ciolek.dev)
Feedback
See anything missing or incorrect?
Suggest an edit to this report.