{"id":"CVE-2021-31525","aliases":["CVE-2021-31525","GHSA-h86h-8ppg-mxmh","BIT-GOLANG-2021-31525","GO-2022-0236"],"related":["CGA-gp75-g599-6fr2"],"kind":"vulnerability","state":"published","title":"golang.org/x/net/http/httpguts vulnerable to Uncontrolled Recursion","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"A malicious HTTP server or client can cause the net/http client or server to panic.\n\nReadRequest 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.\n\nThis also affects golang.org/x/net/http2/h2c and HeaderValuesContainsToken in golang.org/x/net/http/httpguts.","format":"markdown","source":"go"},{"lang":"es","text":"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.&#xa0;El Servidor, el Transporte y el Cliente pueden estar afectados en algunas configuraciones","source":"nvd"}],"published":"2021-05-27T12:17:11.000Z","modified":"2026-09-10T03:49:23.210Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:H/Au:N/C:N/I:N/A:P","score":2.6,"rating":"LOW"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20210428140749-89ef3d95e781"}],"ecosystem":"Go","package":"golang.org/x/net","purl":"pkg:golang/golang.org/x/net","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.12"},{"type":"semver","introduced":"1.16.0-0","status":"affected","fixed":"1.16.4"}],"ecosystem":"Go","package":"stdlib","purl":"pkg:golang/stdlib","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20210428140749-89ef3d95e781"}],"ecosystem":"Go","package":"golang.org/x/net","purl":"pkg:golang/golang.org/x/net","source":"go"},{"ranges":[{"status":"affected","fixed":"1.15.12"},{"status":"affected","introduced":"1.16.0","fixed":"1.16.4"}],"vendor":"golang","product":"go","cpe":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.12"},{"type":"semver","introduced":"1.16.0","status":"affected","fixed":"1.16.4"}],"ecosystem":"Bitnami","package":"golang","purl":"pkg:bitnami/golang","source":"bitnami"}],"references":[{"url":"https://groups.google.com/g/golang-announce/c/cu9SP4eSXMc","tags":["advisory","mailing-list","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/golang/go/issues/45710","tags":["advisory","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF/","tags":["vendor-advisory","web","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.gentoo.org/glsa/202208-02","tags":["advisory","third-party-advisory","vendor-advisory","web","x-refsource-gentoo","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31525","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/golang/go","tags":["package"],"sources":["ghsa"]},{"url":"https://go.dev/cl/313069","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://go.dev/issue/45710","tags":["report","web"],"sources":["ghsa","go"]},{"url":"https://go.googlesource.com/net/+/89ef3d95e781148a0951956029c92a211477f7f9","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ISRZZ6NY5R2TBYE72KZFOCO25TEUQTBF","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0236","tags":["web"],"sources":["ghsa"]}],"credits":["Guido Vranken"],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31525","url":"https://www.cve.org/CVERecord?id=CVE-2021-31525","licence":"CVE Terms of Use","modified":"2024-08-03T23:03:33.426Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h86h-8ppg-mxmh","url":"https://github.com/advisories/GHSA-h86h-8ppg-mxmh","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:23.210Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0236","url":"https://pkg.go.dev/vuln/GO-2022-0236","licence":"CC-BY-4.0","modified":"2026-02-04T02:54:01.110Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31525","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31525","licence":"Public domain","modified":"2026-06-17T03:51:57.560Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GOLANG-2021-31525","url":"https://osv.dev/vulnerability/BIT-GOLANG-2021-31525","licence":"Apache-2.0","modified":"2026-09-08T08:47:48.215Z"}],"updatedAt":"2026-11-25T22:58:01.569Z","epss":{"score":0.03692,"percentile":0.90004,"date":"2026-12-01T12:00:22.000Z"}}