CVE-2024-24791 Denial of service due to improper 100-continue handling in net/http

High 7.5 Published Updated

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.

PackageAffectedFixed in
golang BitnamiAll versions1.21.12, 1.22.5
stdlib GoAll versions1.21.12, 1.22.5
Linux distribution packages (24)
grafana AlmaLinux:8All versions9.2.10-18.el8_10
grafana-selinux AlmaLinux:8All versions9.2.10-18.el8_10
grafana Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-18.el8_10
grafana-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-18.el8_10
grafana-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-18.el8_10
grafana-selinux Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-18.el8_10
grafana Rocky Linux:8All versions0:9.2.10-18.el8_10
go1.21 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSAll versions1.21.12-150000.1.39.1
go1.21 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSSAll versions1.21.12-150000.1.39.1
go1.21 SUSE:Linux Enterprise Module for Development Tools 15 SP5All versions1.21.12-150000.1.39.1
go1.22 SUSE:Linux Enterprise Module for Development Tools 15 SP5All versions1.22.5-150000.1.21.1
go1.21 SUSE:Linux Enterprise Module for Development Tools 15 SP6All versions1.21.12-150000.1.39.1
go1.22 SUSE:Linux Enterprise Module for Development Tools 15 SP6All versions1.22.5-150000.1.21.1
go1.21 SUSE:Linux Enterprise Server 15 SP4-LTSSAll versions1.21.12-150000.1.39.1
go1.21 SUSE:Linux Enterprise Server for SAP Applications 15 SP4All versions1.21.12-150000.1.39.1
go1.21 SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.21.12-1.39.1
go1.22 SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.22.5-1.15.1
go1.21 openSUSE:Leap 15.5All versions1.21.12-150000.1.39.1
go1.22 openSUSE:Leap 15.5All versions1.22.5-150000.1.21.1
go1.21 openSUSE:Leap 15.6All versions1.21.12-150000.1.39.1
go1.22 openSUSE:Leap 15.6All versions1.22.5-150000.1.21.1
forgejo openSUSE:TumbleweedAll versions7.0.5-1.1
go1.21 openSUSE:TumbleweedAll versions1.21.12-1.1
go1.22 openSUSE:TumbleweedAll versions1.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.

Is CVE-2024-24791 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free