cve.bz

CVE-2024-4340 Uncontrolled Recursion

7.5 highEPSS 3.2%Fix available

High (7.5). EPSS 3.2% estimated probability of exploitation activity in the next 30 days. Fixed in sqlparse 0.5.0.

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

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
3.2% (unchanged from 3.2% a week ago; 3.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2024-04-30. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-674 Uncontrolled Recursion
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-4340 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-4340?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-4340?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-4340 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2m57-hf25-phggPyPIsqlparse<0.5.00.5.0
PYSEC-2026-1940PyPIsqlparse<0.5.00.5.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11sqlparse0.4.1-1+deb11u1DLA-4000-1
Debian12sqlparse0.4.2-1+deb12u1DEBIAN-CVE-2024-4340
Debian13, 14sqlparse0.5.0-1DEBIAN-CVE-2024-4340
Ubuntu22.04:LTSsqlparse0.4.2-1ubuntu0.22.04.2UBUNTU-CVE-2024-4340 USN-6771-1
Ubuntu24.04:LTSsqlparse0.4.4-1ubuntu0.1UBUNTU-CVE-2024-4340 USN-6771-1
Red Hatansible_automation_platform:2.4::el8automation-controller-venv-tower0:4.5.7-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8automation-hub, python39-galaxy-ng, python3x-galaxy-ng0:4.9.2-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-aiohttp, python3x-aiohttp, python39-aiohttp-debuginfo and 1 more0:3.9.5-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-gunicorn, python3x-gunicorn0:22.0.0-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-pillow, python3x-pillow, python39-pillow-debuginfo and 1 more0:10.3.0-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-pydantic, python3x-pydantic0:1.10.15-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-social-auth-app-django, python3x-social-auth-app-django0:5.4.1-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8python39-sqlparse, python3x-sqlparse0:0.5.0-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8python39-idna, python3x-idna0:3.7-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8python39-requests, python3x-requests0:2.32.2-1.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8python39-black, python3x-black0:22.8.0-2.el8apRHSA-2024:3781
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8python39-cryptography, python3x-cryptography, python39-cryptography-debuginfo and 1 more0:42.0.5-1.el8apRHSA-2024:3781
29 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morepython3-sqlparse0.4.2-150300.12.1SUSE-SU-2024:1861-1
SUSELinux Enterprise Module for Public Cloud 15 SP4, Linux Enterprise Module for Public Cloud 15 SP5python-sqlparse0.4.4-150400.6.7.1SUSE-SU-2024:1767-1
openSUSELeap 15.5python-sqlparse0.4.4-150400.6.7.1SUSE-SU-2024:1767-1
openSUSELeap 15.5python3-sqlparse0.4.2-150300.12.1SUSE-SU-2024:1861-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.4 for RHEL 8python3x-sqlparse-0:0.5.0-1.el8apFixed 2024-06-10RHSA-2024:3781
Red Hat Ansible Automation Platform 2.4 for RHEL 9python-sqlparse-0:0.5.0-1.el9apFixed 2024-06-10RHSA-2024:3781
Red Hat OpenStack Platform 17.1 for RHEL 8python-sqlparse-0:0.4.1-2.el8ostFixed 2024-11-21RHSA-2024:9986
Red Hat OpenStack Platform 17.1 for RHEL 9python-sqlparse-0:0.4.1-2.el9ostFixed 2024-11-21RHSA-2024:9984
Red Hat Satellite 6.15 for RHEL 8python-sqlparse-0:0.5.0-1.el8pcFixed 2025-06-26RHSA-2025:9838
RHUI 4 for RHEL 8python-sqlparse-0:0.5.0-1.el8uiFixed 2025-02-12RHSA-2025:1335
Red Hat OpenShift Container Platform 4python-sqlparseWill not fix
Red Hat OpenStack Platform 16.1python-sqlparseNot affected
Red Hat OpenStack Platform 16.2python-sqlparseNot affected
Red Hat OpenStack Platform 18.0python-sqlparseAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-4340.

Attack patterns (CAPEC)

  • CAPEC-230 Serialized Data with Nested Payloads Likelihood: Medium · Severity: High
  • CAPEC-231 Oversized Serialized Data Payloads Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON