What’s Vulnerable › Vulnerabilities
CVE-2021-31525: Panic due to large headers in net/http and golang.org/x/net/http/httpguts
- Severity: medium (CVSS 5.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-05-27 · updated 2026-06-17
- Weakness: CWE-674
Description
net/http in Go before 1.15.12 and 1.16.x before 1.16.4 allows remote attackers to cause a denial of service (panic) via a large header to ReadRequest or ReadResponse. Server, Transport, and Client can each be affected in some configurations.
Affected products
- Fedoraproject Fedora: 34
- Go: before 1.15.12; from 1.16.0 before 1.16.4 — fixed in 1.15.12, 1.16.4
- Golang.Org/X/Net: before 0.0.0-20210428140749-89ef3d95e781 — fixed in 0.0.0-20210428140749-89ef3d95e781
- Go Stdlib: before 1.15.12; from 1.16.0-0 before 1.16.4 — fixed in 1.15.12, 1.16.4
How to fix
Upgrade to a fixed version: Go 1.15.12, 1.16.4; Golang.Org/X/Net 0.0.0-20210428140749-89ef3d95e781; Go Stdlib 1.15.12, 1.16.4. Check the vendor advisory for mitigations.
References
- https://github.com/golang/go/issues/45710
- https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF/
- https://security.gentoo.org/glsa/202208-02
- https://github.com/golang/go/issues/45710
- https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF/
- https://security.gentoo.org/glsa/202208-02
Get alerted when CVE-2021-31525 or the next vulnerability affects your stack