Skip to content
Fencer Vulns
high 7.5

CVE-2024-4340 json

Passing a heavily nested list to sqlparse.parse() leads to a Denial of Service due to RecursionError.

published 2024-04-15 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-1064 , GHSA-2m57-hf25-phgg , PYSEC-2026-1940

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
3.2%
EPSS 3.2% chance of exploitation in 30 days, percentile 88%
public exploits
0
none known

Summary

Passing a heavily nested list to sqlparse.parse() leads to a Denial of Service due to RecursionError.

Patch / fix

  • pypi sqlparse 0.5.0
  • sqlparse_project sqlparse 0.5.0
  • sqlparse Debian 12 0.4.2-1+deb12u1
  • sqlparse Debian 14, Debian 13 0.5.0-1

debian advisories DEBIAN-CVE-2024-4340

  • sqlparse Ubuntu 22.04 LTS 0.4.2-1ubuntu0.22.04.2
  • sqlparse Ubuntu 24.04 LTS 0.4.4-1ubuntu0.1

ubuntu advisories UBUNTU-CVE-2024-4340

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • cjson satellite capsule 6.15, satellite 6.15 1.7.18-1.el8sat
  • rubygem-rack satellite capsule 6.15, satellite 6.15 2.2.14-1.el8sat
  • python-sqlparse satellite capsule 6.15, satellite 6.15 0.5.0-1.el8pc
  • python3.11-sqlparse satellite capsule 6.15, satellite 6.15 0.5.0-1.el8pc
  • python-django rhui 4 4.2.15-1.el8ui
  • python-grpcio rhui 4 1.65.4-1.el8ui
  • python-jinja2 rhui 4 3.1.4-1.el8ui
  • python-aiohttp rhui 4 3.9.4-1.el8ui

red hat advisories RHSA-2025:9838RHSA-2025:1335RHSA-2024:9984RHSA-2024:9986RHSA-2024:3781

  • python3-sqlparse SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES 15 SP4-LTSS +10 more 0.4.2-150300.12.1
  • python-sqlparse SLE Module for Public Cloud 15 SP5, SLE Module for Public Cloud 15 SP4, openSUSE Leap 15.5 0.4.4-150400.6.7.1

suse advisories SUSE-SU-2024:1861-1SUSE-SU-2024:1767-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-4340 updated cvss 7.5

sqlparse: parsing heavily nested list leads to denial of service

  • Red Hat OpenShift Container Platform 4 python2-sqlparse, python3-sqlparse
    affected: no fix planned “Will not fix”
  • Red Hat OpenStack Platform 18.0 python-sqlparse
    affected: no fix available
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-sqlparse 0.5.0-1.el8ap, python3x-sqlparse 0.5.0-1.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-sqlparse 0.5.0-1.el9ap, python3-sqlparse 0.5.0-1.el9ap
    fixed: vendor fix RHSA-2024:3781
  • Red Hat OpenStack Platform 17.1 python-sqlparse 0.4.1-2.el8ost, python-sqlparse 0.4.1-2.el9ost, python3-sqlparse 0.4.1-2.el8ost, python3-sqlparse 0.4.1-2.el9ost
    fixed: vendor fix RHSA-2024:9986
  • Red Hat Satellite 6.15 for RHEL 8 python-sqlparse 0.5.0-1.el8pc, python3.11-sqlparse 0.5.0-1.el8pc
    fixed: vendor fix RHSA-2025:9838
  • Red Hat RHUI 4 for RHEL 8 python-sqlparse 0.5.0-1.el8ui, python3.11-sqlparse 0.5.0-1.el8ui
    fixed: vendor fix RHSA-2025:1335
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8 receptor 1.4.8-1.el8ap, python39-idna 3.7-1.el8ap, python3x-idna 3.7-1.el8ap, receptorctl 1.4.8-1.el8ap, ansible-core 2.15.11-1.el8ap, ansible-test 2.15.11-1.el8ap, +37 more Red Hat Ansible Automation Platform 2.4 for RHEL 9 receptor 1.4.8-1.el9ap, python-idna 3.7-1.el9ap, python3-idna 3.7-1.el9ap, receptorctl 1.4.8-1.el9ap, python-black 22.8.0-2.el9ap, python-jinja2 3.1.4-1.el9ap, +37 more Red Hat OpenStack Platform 16.1 python3-sqlparse Red Hat OpenStack Platform 16.2 python3-sqlparse Red Hat Satellite 6.15 for RHEL 8 cjson 1.7.18-1.el8sat, satellite 6.15.5.3-1.el8sat, rubygem-rack 2.2.14-1.el8sat, satellite-cli 6.15.5.3-1.el8sat, satellite-common 6.15.5.3-1.el8sat, satellite-capsule 6.15.5.3-1.el8sat, +1 more Red Hat RHUI 4 for RHEL 8 libcomps 0.1.21-1.el8ui, python-jq 1.6.0-4.el8ui, python-xlrd 2.0.1-9.el8ui, python-xlwt 1.3.0-7.el8ui, python-yarl 1.8.2-5.el8ui, python-zipp 3.4.0-8.el8ui, +196 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
partial
Assessed
2 y ago

Exploit prediction

3.24% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
pypi sqlparse
<0.5.0
0.5.0

Affected products

  • sqlparse_project sqlparse

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.