Live threats

All CVEs / Golang

CVE-2021-31525Golang Go

Medium 5.9 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Go.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
golanggo< 1.15.12
golanggo≥ 1.16.0 < 1.16.4
fedoraprojectfedora34

Official sources

References

Links published by the sources. Open them with care.