PT-2021-19405 · Go+6 · Go+6

Guido Vranken

·

Published

2021-02-19

·

Updated

2024-06-15

·

CVE-2021-31525

CVSS v3.1

5.9

Medium

VectorAV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions Go versions prior to 1.15.12 Go versions 1.16.x prior to 1.16.4
Description The issue 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. 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.
Recommendations For Go versions prior to 1.15.12, update to version 1.15.12 or later to resolve the issue. For Go versions 1.16.x prior to 1.16.4, update to version 1.16.4 or later to resolve the issue. As a temporary workaround, consider setting Server.MaxHeaderBytes to a lower value to minimize the risk of exploitation. Restrict access to the Transport and Client components to minimize the risk of exploitation. Avoid using the ReadRequest and ReadResponse functions with large headers until the issue is resolved.

Exploit

Fix

DoS

Uncontrolled Recursion

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALT-PU-2021-1376
ALT-PU-2021-1769
ALT-PU-2021-1781
ALT-PU-2021-1941
BIT-GOLANG-2021-31525
CESA-2021_3076
CVE-2021-31525
GHSA-H86H-8PPG-MXMH
GO-2022-0236
MGASA-2021-0369
OPENSUSE-SU-2021:0904-1
OPENSUSE-SU-2021_0904-1
OPENSUSE-SU-2024:10808-1
OPENSUSE-SU-2024:10809-1
RHSA-2021:2704
RHSA-2021:2984
RHSA-2021:3076
RHSA-2021:3248
RHSA-2021:3487
RHSA-2021:3555
RHSA-2021:4103
RHSA-2021:5072
RHSA-2021_3076
RHSA-2022:0308
RLSA-2021:3076
SUSE-SU-2021:2082-1
SUSE-SU-2021:2085-1
SUSE-SU-2021_2082-1
SUSE-SU-2021_2085-1

Affected Products

Alt Linux
Astra Linux
Centos
Go
Red Hat
Rocky Linux
Suse