CVE-2021-31525Golang Go
Medium 5.9 No auth needed
Follow: this CVE · Golang · Golang Go We alert you by email or Slack (account required).
- Priority
- 51
- CVSS 3.1
- 5.9
- EPSS
- 3.7% probability of exploitation in 30 days · percentile 91
- Auth required
- No
- Published
- May 27, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-674
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Go.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | golang.org/x/net |
< 0.0.0-20210428140749-89ef3d95e781 |
0.0.0-20210428140749-89ef3d95e781 |
go get golang.org/x/net@v0.0.0-20210428140749-89ef3d95e781 |
| Go | golang.org/x/net |
< 0.0.0-20210428140749-89ef3d95e781 |
0.0.0-20210428140749-89ef3d95e781 |
go get golang.org/x/net@v0.0.0-20210428140749-89ef3d95e781 |
| Go | stdlib |
< 1.15.12 |
1.15.12 |
go get stdlib@v1.15.12 |
| Go | stdlib |
≥ 1.16.0-0 < 1.16.4 |
1.16.4 |
go get stdlib@v1.16.4 |
Per OSV / GitHub Advisories (GHSA-h86h-8ppg-mxmh, GO-2022-0236). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| golang | go | < 1.15.12 |
| golang | go | ≥ 1.16.0 < 1.16.4 |
| fedoraproject | fedora | 34 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Issue Tracking Patch Third Party Advisory
- groups.google.com Mailing List Third Party Advisory
- lists.fedoraproject.org
- security.gentoo.org Third Party Advisory