CVEfocus › CVE database › CVE-2023-30608

CVE-2023-30608Parser contains an inefficient regular expression in sqlparse

CVSS 5.5 MediumEPSS 1.2% (higher than 67% of CVEs)Published 2023-04-18Updated 2025-11-03Assigner: GitHub_M

sqlparse is a non-validating SQL parser module for Python. In affected versions the SQL parser contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). This issue was introduced by commit `e75e358`. The vulnerability may lead to Denial of Service (DoS). This issues has been fixed in sqlparse 0.4.4 by commit `c457abd5f`. Users are advised to upgrade. There are no known workarounds for this issue.

CWE-1333

What to do

Fixed builds are available from Debian, PyPI, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
2Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04sqlparseFixed0.4.2-1ubuntu0.22.04.1UBUNTU-CVE-2023-30608
Ubuntu 20.04sqlparseFixed0.2.4-3ubuntu0.1UBUNTU-CVE-2023-30608
Ubuntu 18.04sqlparseFixed0.2.4-0.1ubuntu0.1UBUNTU-CVE-2023-30608
Ubuntu 16.04sqlparseFix pending
Ubuntu 14.04sqlparseFix pending
Debian 14sqlparseFixed0.4.4-1DEBIAN-CVE-2023-30608
Debian 13sqlparseFixed0.4.4-1DEBIAN-CVE-2023-30608
Debian 12sqlparseFixed0.4.2-1+deb12u1DEBIAN-CVE-2023-30608
PyPI librarysqlparseFixed0.4.4PYSEC-2023-87

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.