{"id":"GO-2022-0236","revision":"fa3b73b0d5344bfdbd63568d4c337126","records":[{"revision":"fa3b73b0d5344bfdbd63568d4c337126","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2022-0236","aliases":["BIT-golang-2021-31525","CVE-2021-31525","GHSA-h86h-8ppg-mxmh"],"title":"Panic due to large headers in net/http and golang.org/x/net/http/httpguts","description":"A malicious HTTP server or client can cause the net/http client or server to panic.\n\nReadRequest and ReadResponse can hit an unrecoverable panic when reading a very large header (over 7MB on 64-bit architectures, or over 4MB on 32-bit ones). Transport and Client are vulnerable and the program can be made to crash by a malicious server. Server is not vulnerable by default, but can be if the default max header of 1MB is overridden by setting Server.MaxHeaderBytes to a higher value, in which case the program can be made to crash by a malicious client.\n\nThis also affects golang.org/x/net/http2/h2c and HeaderValuesContainsToken in golang.org/x/net/http/httpguts.","state":0,"publishedAt":"2022-07-15T23:04:18+00:00","modifiedAt":"2026-02-04T02:54:01.110291+00:00","affected":[{"ecosystem":"Go","name":"stdlib","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.15.12"},{"kind":"introduced","version":"1.16.0-0"},{"kind":"fixed","version":"1.16.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"golang.org/x/net","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20210428140749-89ef3d95e781"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://go.dev/cl/313069","https://go.googlesource.com/net/+/89ef3d95e781148a0951956029c92a211477f7f9","https://go.dev/issue/45710","https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc"],"sourceUrl":"https://osv.dev/vulnerability/GO-2022-0236","license":"OSV · upstream source license applies","key":"osv:GO-2022-0236","identifiers":["GO-2022-0236","BIT-golang-2021-31525","CVE-2021-31525","GHSA-h86h-8ppg-mxmh"]},"retained":false,"historicalAffected":[]}],"coverage":[]}