Home / CVE-2024-4340
CVE-2024-4340: is it exploited, and which versions of sqlparse are affected and fixed?
CVE-2024-4340 is an uncontrolled recursion vulnerability in sqlparse. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:38 UTC). Affected: sqlparse before 0.5.0 (GitHub advisory GHSA-2m57-hf25-phgg). Fixed in 0.5.0 (GitHub advisory GHSA-2m57-hf25-phgg). Severity: High (7.5, CVSS 3.1, from JFROG).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:38 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:30 UTC.
What is CVE-2024-4340?
Passing a heavily nested list to sqlparse.parse() leads to a Denial of Service due to RecursionError.
From the CVE record by JFROG, last updated November 3, 2025, 22:05 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| sqlparse | before 0.5.0 | 0.5.0 |
As the CVE record by JFROG states it, last updated November 3, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | sqlparse | < 0.5.0 | 0.5.0 | GHSA-2m57-hf25-phgg |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated May 1, 2024. Summary: sqlparse parsing heavily nested list leads to Denial of Service.
How severe is CVE-2024-4340?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | JFROG |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-4340 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: yes; technical impact: partial (CISA ADP, April 30, 2024)
- EPSS
- 3.24% probability of exploitation activity in the next 30 days, percentile 88.6 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-674 Uncontrolled Recursion
Where are the vendor advisories and references?
- https://research.jfrog.com/vulnerabilities/sqlparse-stack-exhaustion-dos-jfsa-2024-001031292/ third-party-advisory
- https://github.com/andialbrecht/sqlparse/commit/b4a39d9850969b4e1d6940d32094ee0b42a2cf03 patch
- https://github.com/advisories/GHSA-2m57-hf25-phgg
- https://lists.debian.org/debian-lts-announce/2024/12/msg00022.html
When was it published, and where is the official record?
- Reserved
- April 30, 2024
- Published
- April 30, 2024, 14:23 UTC
- CVE record updated
- November 3, 2025, 22:05 UTC by JFROG
- NVD
- Deferred, last modified June 17, 2026, 08:01 UTC
- Last checked
- CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:30 UTC; KEV December 3, 2026, 12:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
Which other CVEs were published on April 30, 2024?
- Apr 30, 2024CVE-2024-4369 Red Hat OpenShift Container Platform 4.14: cleartext Storage of Sensitive Information in an Environment Variable
- Apr 30, 2024CVE-2024-4192 Delta Electronics CNCSoft-G2 DOPSoft: stack buffer overflow
- Apr 30, 2024CVE-2024-4349 SourceCodester Pisay Online E-Learning System: unrestricted file upload
- Apr 30, 2024CVE-2024-32970 phlex-ruby phlex: cross-site scripting (XSS)
- Apr 30, 2024CVE-2024-4348 osCommerce: cross-site scripting (XSS)
- Apr 30, 2024CVE-2024-3746 Measuresoft ScadaPro: improper access control
- Apr 30, 2024CVE-2024-3411 Dell iDRAC8: insufficient Entropy
- Apr 30, 2024CVE-2024-23463 Zscaler Client Connector: time-of-check time-of-use race condition
Every CVE published on April 30, 2024
Questions about CVE-2024-4340
Is CVE-2024-4340 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:38 UTC. FIRST's EPSS gives it a 3.24% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of sqlparse are affected by CVE-2024-4340?
sqlparse before 0.5.0, per the GitHub advisory GHSA-2m57-hf25-phgg. The tables above give every range the sources list.
Which version fixes CVE-2024-4340?
0.5.0, per the GitHub advisory GHSA-2m57-hf25-phgg. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-4340?
High (7.5, CVSS 3.1, from JFROG). The severity table above shows each score with its source.
Where is the official record of CVE-2024-4340?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.