Vulnerability · Published Aug 19, 2024 · Assigned by PSF
CVE-2024-7592Quadratic complexity parsing cookies with backslashes
High 7.5
In plain English
A high-severity uncontrolled resource consumption in CPython from Python Software Foundation. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.3% (higher than 83% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | python3.11 | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-debug | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-devel | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-idle | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-libs | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-test | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.11-tkinter | 3.11.9-7.el9_5.3 | ALSA-2025:3634 |
| AlmaLinux:9 | python3.12 | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-debug | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-devel | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-idle | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-libs | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-test | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| AlmaLinux:9 | python3.12-tkinter | 3.12.5-2.el9_5.3 | ALSA-2025:3631 |
| Alpine:v3.20 | py3-tornado | 6.4.2-r0 | ALPINE-CVE-2024-7592 |
| Alpine:v3.20 | python3 | 3.12.6-r0 | ALPINE-CVE-2024-7592 |
| Alpine:v3.21 | python3 | 3.12.6-r0 | ALPINE-CVE-2024-7592 |
| Alpine:v3.22 | python3 | 3.12.6-r0 | ALPINE-CVE-2024-7592 |
| Alpine:v3.23 | python3 | 3.12.6-r0 | ALPINE-CVE-2024-7592 |
| Alpine:v3.24 | python3 | 3.12.6-r0 | ALPINE-CVE-2024-7592 |
| Debian:12 | pypy3 | no fix listed | DEBIAN-CVE-2024-7592 |
| Debian:13 | pypy3 | 7.3.18+dfsg-1 | DEBIAN-CVE-2024-7592 |
| Debian:14 | pypy3 | 7.3.18+dfsg-1 | DEBIAN-CVE-2024-7592 |
| Debian:12 | python3.11 | 3.11.2-6+deb12u5 | DEBIAN-CVE-2024-7592 |
| Debian:13 | python3.13 | 3.13.0~rc2-1 | DEBIAN-CVE-2024-7592 |
| Rocky Linux:9 | python3.11 | 0:3.11.9-7.el9_5.3 | RLSA-2025:3634 |
| Rocky Linux:9 | python3.12 | 0:3.12.5-2.el9_5.3 | RLSA-2025:3631 |
| Ubuntu:22.04:LTS | python3.10 | 3.10.12-1~22.04.6 | USN-7015-1 |
| Ubuntu:22.04:LTS | python3.10 | 3.10.12-1~22.04.6 | UBUNTU-CVE-2024-7592 |
| Ubuntu:24.04:LTS | python3.12 | 3.12.3-1ubuntu0.2 | USN-7015-1 |
| Ubuntu:24.04:LTS | python3.12 | 3.12.3-1ubuntu0.2 | UBUNTU-CVE-2024-7592 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0 – before 3.8.203.9.0 – before 3.9.203.10.0 – before 3.10.153.11.0 – before 3.11.103.12.0 – before 3.12.63.13.0a1 – before 3.13.0rc2 |
Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/python/cpython/pull/123075 patch
- https://github.com/python/cpython/issues/123067 issue-tracking
- https://mail.python.org/archives/list/security-announce@python.org/thread/HXJAAAALNUNGCQUS2W7WR6GFIZIHFOOK/ vendor-advisory
- https://github.com/python/cpython/commit/391e5626e3ee5af267b97e37abc7475732e67621 patch
- https://github.com/python/cpython/commit/dcc3eaef98cd94d6cb6cb0f44bd1c903d04f33b1 patch
- https://github.com/python/cpython/commit/a77ab24427a18bff817025adb03ca920dc3f1a06 patch
- https://github.com/python/cpython/commit/b2f11ca7667e4d57c71c1c88b255115f16042d9a patch
- https://github.com/python/cpython/commit/d4ac921a4b081f7f996a5d2b101684b67ba0ed7f patch
- https://github.com/python/cpython/commit/d662e2db2605515a767f88ad48096b8ac623c774 patch
- https://github.com/python/cpython/commit/44e458357fca05ca0ae2658d62c8c595b048b5ef patch
- https://security.netapp.com/advisory/ntap-20241018-0006/
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html