# 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.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Aug 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2024-7592, ALSA-2025:3631, ALSA-2025:3634, AZL-109674, AZL-47860, AZL-47865, AZL-48036, BELL-CVE-2024-7592, BIT-libpython-2024-7592, BIT-python-2024-7592, BIT-python-min-2024-7592, CLEANSTART-2026-AY28538, CLSA-2024-1727980155, CLSA-2024-1728071268, CLSA-2024-1728403484, CLSA-2024-1728404213, CLSA-2025-1744623473, CLSA-2025-1744874696, CLSA-2025-1745530034, DEBIAN-CVE-2024-7592, GHSA-7pwv-g7hj-39pr, PSF-2024-9, RHSA-2025:3631, RHSA-2025:3634, RLSA-2025:3631, RLSA-2025:3634, SUSE-SU-2026:0774-1, SUSE-SU-2026:0802-1, UBUNTU-CVE-2024-7592, openSUSE-SU-2024:14352-1

## 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 (Inefficient Regular Expression Complexity), CWE-400 (Uncontrolled Resource Consumption)

## 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 | Ecosystem | 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 |
| `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: 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.

## 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

- [CVE-2008-5031](https://insights.sbomify.com/CVE-2008-5031/): Integer overflow in n/a (critical 10.0)
- [CVE-2014-4650](https://insights.sbomify.com/CVE-2014-4650/): Path traversal in n/a (critical 9.8)
- [CVE-2016-5636](https://insights.sbomify.com/CVE-2016-5636/): Integer overflow in n/a (critical 9.8)
- [CVE-2007-4559](https://insights.sbomify.com/CVE-2007-4559/): Path traversal in n/a (critical 9.8)
- [CVE-2017-17522](https://insights.sbomify.com/CVE-2017-17522/): Command injection in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-7592 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-7592 exists.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
- python (Bitnami): affected all versions; fixed in 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
- python-min (Bitnami): affected all versions; fixed in 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-7592/ (Markdown: https://insights.sbomify.com/CVE-2024-7592/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-7592
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-7592
- OSV: https://osv.dev/vulnerability/CVE-2024-7592

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-7592/
Summaries are generated and may contain mistakes; the official description above is the record.
