5.5medium
Parser contains an inefficient regular expression in sqlparse
- Severity
- 5.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.98% (higher than 63% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rrm6-wvj7-cwh2PYSEC-2023-87
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
| Product or package | Versions | Reported by |
|---|---|---|
| andialbrecht sqlparse | >= 0.1.15, < 0.4.4 | CVE List |
| sqlparse (PyPI) | from 0.1.15 before 0.4.4, before c457abd5f097dd13fb21543381e7cfafe7d31cfb, before e75e35869473832a1eb67772b1adfee2db11b85a | GitHub Advisory Database, PyPA Advisory Database |
| sqlparse_project sqlparse | from 0.1.15 before 0.4.4 | NVD |
| debian debian_linux | 10.0 | NVD |
All scores
| GitHub_M | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| GitHub | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
The SQL parser contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). The vulnerability may lead to Denial of Service (DoS).
Patches
This issues has been fixed in sqlparse 0.4.4.
Workarounds
None.
References
This issue was discovered and reported by GHSL team member @erik-krogh (Erik Krogh Kristensen).
- Commit that introduced the vulnerability: e75e35869473832a1eb67772b1adfee2db11b85a
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-30608 changed 2025-11-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rrm6-wvj7-cwh2 changed 2025-11-04 | CC-BY-4.0 |
| NVD | CVE-2023-30608 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2023-87 changed 2023-11-08 | CC-BY-4.0 |