CVE-2024-7592 Quadratic complexity parsing cookies with backslashes
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.
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.
| Package | Affected | Fixed in |
|---|---|---|
libpython Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
python Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
python-min Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
Linux distribution packages (37)
python3.11 AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-debug AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-devel AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-idle AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-libs AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-test AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.11-tkinter AlmaLinux:9 | All versions | 3.11.9-7.el9_5.3 |
python3.12 AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-debug AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-devel AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-idle AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-libs AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-test AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.12-tkinter AlmaLinux:9 | All versions | 3.12.5-2.el9_5.3 |
python3.11 Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-devel Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-libs Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-tkinter Red Hat:enterprise_linux:9::appstream | All versions | 0:3.11.9-7.el9_5.3 |
python3.12 Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-devel Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-libs Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-tkinter Red Hat:enterprise_linux:9::appstream | All versions | 0:3.12.5-2.el9_5.3 |
python3.11 Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-debug Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-debugsource Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-idle Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-test Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.11-tkinter Red Hat:enterprise_linux:9::crb | All versions | 0:3.11.9-7.el9_5.3 |
python3.12 Red Hat:enterprise_linux:9::crb | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-debug Red Hat:enterprise_linux:9::crb | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:3.12.5-2.el9_5.3 |
python3.12-debugsource Red Hat:enterprise_linux:9::crb | All versions | 0: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.
Other vulnerabilities in Python Python
Sources
Also known as ALPINE-CVE-2024-7592, ALSA-2025:3631, ALSA-2025:3634, AZL-109674, AZL-47860, AZL-47865 and 24 more.