5.9medium
golang.org/x/net/http/httpguts vulnerable to Uncontrolled Recursion
- Severity
- 5.9medium CVSS:3.1 by NVD
- Exploit likelihood
- 3.69% (higher than 90% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-h86h-8ppg-mxmhBIT-GOLANG-2021-31525GO-2022-0236
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
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| golang.org/x/net (Go) | before 0.0.0-20210428140749-89ef3d95e781 | GitHub Advisory Database, Go Vulnerability Database |
| stdlib (Go) | before 1.15.12, from 1.16.0-0 before 1.16.4 | Go Vulnerability Database |
| golang go | before 1.15.12, from 1.16.0 before 1.16.4 | NVD |
| fedoraproject fedora | 34 | NVD |
| golang (Bitnami) | before 1.15.12, from 1.16.0 before 1.16.4 | Bitnami Vulnerability Database |
All scores
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.6low CVSS:2.0 | AV:N/AC:H/Au:N/C:N/I:N/A:P |
| Bitnami Vulnerability Database | medium rating |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
golang.org/x/net/http/httpguts 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.
Go Vulnerability Database
A malicious HTTP server or client can cause the net/http client or server to panic.
ReadRequest 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.
This also affects golang.org/x/net/http2/h2c and HeaderValuesContainsToken in golang.org/x/net/http/httpguts.
NVD (es)
net/http en Go versiones anteriores a 1.15.12 y versiones 1.16.x anteriores a 1.16.4, permite a atacantes remotos causar una denegación de servicio (pánico) por medio de un encabezado grande en los parámetros ReadRequest o ReadResponse. El Servidor, el Transporte y el Cliente pueden estar afectados en algunas configuraciones
References
| https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc | advisory, mailing-list, third-party-advisory, web | |
| https://github.com/golang/go/issues/45710 | advisory, issue-tracking, patch, third-party-advisory, web | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF/ | vendor-advisory, web | |
| https://security.gentoo.org/glsa/202208-02 | advisory, third-party-advisory, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-31525 | advisory, web | |
| https://github.com/golang/go | package | |
| https://go.dev/cl/313069 | fix, web | |
| https://go.dev/issue/45710 | report, web | |
| https://go.googlesource.com/net/+/89ef3d95e781148a0951956029c92a211477f7f9 | fix, web | |
| https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF | web | |
| https://pkg.go.dev/vuln/GO-2022-0236 | web | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-31525 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h86h-8ppg-mxmh changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0236 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2021-31525 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-GOLANG-2021-31525 changed 2026-09-08 | Apache-2.0 |