cve.bz

CVE-2021-31525 Uncontrolled Recursion

5.9 mediumEPSS 3.7%Fix available

Medium (5.9). EPSS 3.7% estimated probability of exploitation activity in the next 30 days. Fixed in golang.org/x/net 0.0.0-20210428140749-89ef3d95e781.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
3.7% (unchanged from 3.7% a week ago; 3.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 90th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-674 Uncontrolled Recursion
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-31525 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-31525?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-31525?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-31525 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
golang:gobefore 1.15.12
golang:gofrom 1.16.0 before 1.16.4
fedoraproject:fedora34

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-h86h-8ppg-mxmhGogolang.org/x/net<0.0.0-20210428140749-89ef3d95e7810.0.0-20210428140749-89ef3d95e781
GO-2022-0236Gostdlib<1.15.12
>=1.16.0-0 <1.16.4
1.15.12, 1.16.4
GO-2022-0236Gogolang.org/x/net<0.0.0-20210428140749-89ef3d95e7810.0.0-20210428140749-89ef3d95e781

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14golang-golang-x-net1:0.0+git20210119.5f4716e+dfsg-3DEBIAN-CVE-2021-31525
UbuntuPro:16.04:LTSgoogle-guest-agent, golang-golang-x-net-devno fix listedUBUNTU-CVE-2021-31525
UbuntuPro:18.04:LTS, Pro:20.04:LTSgolang-1.16, golang-golang-x-net-devno fix listedUBUNTU-CVE-2021-31525
Red Hatcontainer_native_virtualization:4.9::el7kubevirt, kubevirt-virtctl, kubevirt-virtctl-redistributable0:4.9.0-287.el7RHSA-2021:4103
Red Hatcontainer_native_virtualization:4.9::el8kubevirt, kubevirt-virtctl, kubevirt-virtctl-redistributable0:4.9.0-287.el8RHSA-2021:4103
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.5.0-2.module+el8.4.0+8864+58b0fcdbRHSA-2021:3076
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 5 more0:1.15.14-1.module+el8.4.0+11833+614b07b8RHSA-2021:3076
Red Hatopenshift:4.7::el7cri-o, cri-o-debuginfo0:1.20.4-7.rhaos4.7.git6287500.el7RHBA-2021:2979
Red Hatopenshift:4.7::el7openshift, openshift-hyperkube0:4.7.0-202107292242.p0.git.558d959.assembly.stream.el7RHBA-2021:2979
Red Hatopenshift:4.7::el7openshift-clients, openshift-clients-redistributable0:4.7.0-202107292242.p0.git.8b4b094.assembly.stream.el7RHBA-2021:2979
Red Hatopenshift:4.7::el8atomic-openshift-service-idler0:4.7.0-202107291238.p0.git.39cfc66.assembly.stream.el8RHBA-2021:2979
Red Hatopenshift:4.7::el8cri-o, cri-o-debuginfo, cri-o-debugsource0:1.20.4-7.rhaos4.7.git6287500.el8RHBA-2021:2979
Red Hatopenshift:4.7::el8ignition, ignition-validate, ignition-debuginfo and 2 more0:2.9.0-4.rhaos4.7.git1d56dc8.el8RHBA-2021:2979
Red Hatopenshift:4.7::el8openshift, openshift-hyperkube0:4.7.0-202107292242.p0.git.558d959.assembly.stream.el8RHBA-2021:2979
Red Hatopenshift:4.7::el8openshift-clients, openshift-clients-redistributable0:4.7.0-202107292242.p0.git.8b4b094.assembly.stream.el8RHBA-2021:2979
17 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Development Tools 15 SP2, Linux Enterprise Module for Development Tools 15 SP3go1.151.15.12-1.30.1SUSE-SU-2021:2082-1
SUSELinux Enterprise Module for Development Tools 15 SP2, Linux Enterprise Module for Development Tools 15 SP3go1.161.16.4-1.14.2SUSE-SU-2021:2085-1
openSUSELeap 15.2go1.151.15.12-lp152.17.1openSUSE-SU-2021:0904-1
openSUSETumbleweedgo1.151.15.15-1.2openSUSE-SU-2024:10808-1
openSUSETumbleweedgo1.161.16.8-1.1openSUSE-SU-2024:10809-1
Rocky Linux8delve0:1.5.0-2.module+el8.4.0+396+d2d16ae3RLSA-2021:3076
Rocky Linux8golang, go-toolset0:1.15.14-1.module+el8.4.0+632+4dba2916RLSA-2021:3076
Alpinev3.13go1.15.12-r0ALPINE-CVE-2021-31525
Alpinev3.14, v3.15, v3.16 and 8 morego1.16.4-r0ALPINE-CVE-2021-31525

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability potentially affects any component written in Go that uses net/http from the standard library. In OpenShift Container Platform (OCP), OpenShift Virtualization, OpenShift ServiceMesh (OSSM) and OpenShift distributed tracing (formerly OpenShift Jaeger), no server side component allows HTTP header values larger than 1 MB (the default), preventing this vulnerability from being exploited by malicious clients. It is possible for components that make client connections to malicious servers to be exploited, however the maximum impact is a crash. This vulnerability is rated Low for the following components:

* OpenShift Container Platform

* OpenShift Virtualization

* OpenShift ServiceMesh

* OpenShift distributed tracing components.

ProductPackageStateAdvisory
Native Client for RHEL 7 for Red Hat Storageheketi-0:10.4.0-2.el7rhgsFixed 2022-01-27RHSA-2022:0308
Openshift Serveless 1.16openshift-serverless-1/client-kn-rhel8:0.22.0-4Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-apiserver-receive-adapter-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-controller-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-in-memory-channel-controller-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-in-memory-channel-dispatcher-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-mtbroker-filter-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-mtbroker-ingress-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-mtchannel-broker-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Openshift Serveless 1.16openshift-serverless-1/eventing-mtping-rhel8:0.22.0-2Fixed 2021-07-13RHSA-2021:2705
Migration Toolkit for Containersrhmtc/openshift-migration-rhel8-operatorAffected
Migration Toolkit for Containersrhmtc/openshift-migration-velero-plugin-for-mtc-rhel8Affected
OpenShift Serverlessknative-eventingAffected
OpenShift Service Mesh 2.0servicemeshAffected
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
OpenShift Service Mesh 2.0servicemesh-operatorAffected
OpenShift Service Mesh 2.0servicemesh-prometheusAffected
Red Hat Ceph Storage 2golangOut of support scope
Red Hat Ceph Storage 2grafanaOut of support scope
Red Hat Ceph Storage 3golangOut of support scope
305 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-31525.

Attack patterns (CAPEC)

  • CAPEC-230 Serialized Data with Nested Payloads Likelihood: Medium · Severity: High
  • CAPEC-231 Oversized Serialized Data Payloads Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON