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

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.98%, higher than 63% of CVEs (2026-12-01)
- Published: 2023-04-18T21:32:11.145Z
- Modified: 2026-06-17T05:55:07.650Z
- Also known as: GHSA-rrm6-wvj7-cwh2, PYSEC-2023-87
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- andialbrecht sqlparse: >= 0.1.15, < 0.4.4
- sqlparse (PyPI): from 0.1.15 before 0.4.4; before c457abd5f097dd13fb21543381e7cfafe7d31cfb; before e75e35869473832a1eb67772b1adfee2db11b85a
- sqlparse_project sqlparse: from 0.1.15 before 0.4.4
- debian debian_linux: 10.0

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 Medium `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: 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`

## References

- <https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-rrm6-wvj7-cwh2> (advisory, patch, vendor-advisory, web)
- <https://github.com/andialbrecht/sqlparse/commit/c457abd5f097dd13fb21543381e7cfafe7d31cfb> (fix, patch, web)
- <https://github.com/andialbrecht/sqlparse/commit/e75e35869473832a1eb67772b1adfee2db11b85a> (fix, patch, web)
- <https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS> (technical-description, web)
- <https://lists.debian.org/debian-lts-announce/2023/05/msg00017.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/12/msg00022.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-30608> (advisory)
- <https://github.com/andialbrecht/sqlparse> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/sqlparse/PYSEC-2023-87.yaml> (web)

## Sources

- CVE List: [CVE-2023-30608](https://www.cve.org/CVERecord?id=CVE-2023-30608), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-rrm6-wvj7-cwh2](https://github.com/advisories/GHSA-rrm6-wvj7-cwh2), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2023-30608](https://nvd.nist.gov/vuln/detail/CVE-2023-30608), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-87](https://osv.dev/vulnerability/PYSEC-2023-87), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2023-30608 · Whole record: https://cve.day/CVE-2023-30608.json · Rebuilt by cve.day 2026-11-25T22:58:23.625Z
