CVE-2024-7592 Quadratic complexity parsing cookies with backslashes

High 7.5 Published Updated

Attackers can cause excessive CPU consumption in Python applications by sending cookies with backslashes, leading to denial of service.

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-7592?

CVE-2024-7592 is a high-severity denial of service vulnerability in Python Python, published on 19 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

There is a LOW severity vulnerability affecting CPython, specifically the 'http.cookies' standard library module.

When parsing cookies that contained backslashes for quoted characters in the cookie value, the parser would use an algorithm with quadratic complexity, resulting in excess CPU resources being used while parsing the value.

Weakness: CWE-1333, CWE-400

Which versions are affected by CVE-2024-7592?

3 open source packages ship an affected version, including libpython, python and python-min. It affects 1 product.

PackageAffectedFixed in
libpython BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
python BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
python-min BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
Linux distribution packages (37)
python3.11 AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-debug AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-devel AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-idle AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-libs AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-test AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.11-tkinter AlmaLinux:9All versions3.11.9-7.el9_5.3
python3.12 AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-debug AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-devel AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-idle AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-libs AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-test AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.12-tkinter AlmaLinux:9All versions3.12.5-2.el9_5.3
python3.11 Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.11-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.11-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.11-devel Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.11-libs Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.11-tkinter Red Hat:enterprise_linux:9::appstreamAll versions0:3.11.9-7.el9_5.3
python3.12 Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.12-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.12-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.12-devel Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.12-libs Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.12-tkinter Red Hat:enterprise_linux:9::appstreamAll versions0:3.12.5-2.el9_5.3
python3.11 Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-debug Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-debuginfo Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-debugsource Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-idle Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-test Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.11-tkinter Red Hat:enterprise_linux:9::crbAll versions0:3.11.9-7.el9_5.3
python3.12 Red Hat:enterprise_linux:9::crbAll versions0:3.12.5-2.el9_5.3
python3.12-debug Red Hat:enterprise_linux:9::crbAll versions0:3.12.5-2.el9_5.3
python3.12-debuginfo Red Hat:enterprise_linux:9::crbAll versions0:3.12.5-2.el9_5.3
python3.12-debugsource Red Hat:enterprise_linux:9::crbAll versions0:3.12.5-2.el9_5.3

Products include Python Python.

How do I fix CVE-2024-7592?

Upgrade libpython to a fixed version for your release line: 3.8.20, 3.9.20, 3.10.15 or 3.11.10.

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-7592 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-7592 exists.

All Python Python vulnerabilities

Sources

Also known as ALPINE-CVE-2024-7592, ALSA-2025:3631, ALSA-2025:3634, AZL-109674, AZL-47860, AZL-47865 and 24 more.

Is CVE-2024-7592 in your software?

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

Check your SBOMs for free