CVE-2024-24791 Denial of service due to improper 100-continue handling in net/http
An attacker can cause denial of service in Go HTTP reverse proxies by exploiting improper handling of 100-continue responses.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-24791?
CVE-2024-24791 is a high-severity denial of service vulnerability in Go standard library net/http, published on 2 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail. An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.
Which versions are affected by CVE-2024-24791?
2 open source packages ship an affected version, including golang and stdlib.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.21.12, 1.22.5 |
stdlib Go | All versions | 1.21.12, 1.22.5 |
Linux distribution packages (24)
grafana AlmaLinux:8 | All versions | 9.2.10-18.el8_10 |
grafana-selinux AlmaLinux:8 | All versions | 9.2.10-18.el8_10 |
grafana Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-18.el8_10 |
grafana-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-18.el8_10 |
grafana-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-18.el8_10 |
grafana-selinux Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-18.el8_10 |
grafana Rocky Linux:8 | All versions | 0:9.2.10-18.el8_10 |
go1.21 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.21.12-150000.1.39.1 |
go1.21 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.21.12-150000.1.39.1 |
go1.21 SUSE:Linux Enterprise Module for Development Tools 15 SP5 | All versions | 1.21.12-150000.1.39.1 |
go1.22 SUSE:Linux Enterprise Module for Development Tools 15 SP5 | All versions | 1.22.5-150000.1.21.1 |
go1.21 SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 1.21.12-150000.1.39.1 |
go1.22 SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 1.22.5-150000.1.21.1 |
go1.21 SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.21.12-150000.1.39.1 |
go1.21 SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.21.12-150000.1.39.1 |
go1.21 SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.21.12-1.39.1 |
go1.22 SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.22.5-1.15.1 |
go1.21 openSUSE:Leap 15.5 | All versions | 1.21.12-150000.1.39.1 |
go1.22 openSUSE:Leap 15.5 | All versions | 1.22.5-150000.1.21.1 |
go1.21 openSUSE:Leap 15.6 | All versions | 1.21.12-150000.1.39.1 |
go1.22 openSUSE:Leap 15.6 | All versions | 1.22.5-150000.1.21.1 |
forgejo openSUSE:Tumbleweed | All versions | 7.0.5-1.1 |
go1.21 openSUSE:Tumbleweed | All versions | 1.21.12-1.1 |
go1.22 openSUSE:Tumbleweed | All versions | 1.22.5-1.1 |
How do I fix CVE-2024-24791?
Upgrade golang to a fixed version for your release line: 1.21.12 or 1.22.5.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-24791 being exploited?
There is no known exploitation of CVE-2024-24791 in the wild and no public exploit code.
Sources
Also known as ALSA-2024:7349, AZL-43068, AZL-78960, AZL-98754, BELL-CVE-2024-24791, BIT-golang-2024-24791 and 24 more.