What’s Vulnerable › Vulnerabilities
CVE-2023-30608: Parser contains an inefficient regular expression in sqlparse
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-04-18 · updated 2026-06-17
- Weakness: CWE-1333
Description
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.
Affected products
- Debian Linux: 10.0
- andialbrecht sqlparse: from 0.1.15 before 0.4.4 — fixed in 0.4.4
- Pypi Sqlparse: from 0.1.15 before 0.4.4; 0.1.15, 0.1.16, 0.1.17, 0.1.18, 0.1.19, 0.2.0 (+10) — fixed in 0.4.4
How to fix
Upgrade to a fixed version: andialbrecht sqlparse 0.4.4; Pypi Sqlparse 0.4.4. Check the vendor advisory for mitigations.
References
- https://github.com/andialbrecht/sqlparse/commit/c457abd5f097dd13fb21543381e7cfafe7d31cfb
- https://github.com/andialbrecht/sqlparse/commit/e75e35869473832a1eb67772b1adfee2db11b85a
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-rrm6-wvj7-cwh2
- https://lists.debian.org/debian-lts-announce/2023/05/msg00017.html
- https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS
- https://github.com/andialbrecht/sqlparse/commit/c457abd5f097dd13fb21543381e7cfafe7d31cfb
- https://github.com/andialbrecht/sqlparse/commit/e75e35869473832a1eb67772b1adfee2db11b85a
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-rrm6-wvj7-cwh2
- https://lists.debian.org/debian-lts-announce/2023/05/msg00017.html
- https://lists.debian.org/debian-lts-announce/2024/12/msg00022.html
- https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS
Get alerted when CVE-2023-30608 or the next vulnerability affects your stack