CVE-2026-59893
HIGH 7.5CVSS 3.1sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, SQL_REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py repeatedly scan unmatched dollar-quoted literal and multiline-comment delimiters, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This issue is fixed in version 0.6.0.
- Published
- 17 Aug 2026
- Last modified
- 23 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-1333
- Also known as
- GHSA-prg7-hcfm-mfcrPYSEC-2026-3698
- Sources
- NVDJSONOSV GHSA-prg7-hcfm-mfcrJSONOSV PYSEC-2026-3698JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | sqlparse | < 0.6.0 | 0.6.0 |
References
- https://github.com/andialbrecht/sqlparse/commit/d1d80602741f77ec78e5a04ce4719244cf32352e · WEB
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr · WEB
- https://github.com/andialbrecht/sqlparse · PACKAGE
- https://pypi.org/project/sqlparse · PACKAGE
- https://github.com/advisories/GHSA-prg7-hcfm-mfcr · ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-59893 · ADVISORY
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 17 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 17 Aug 2026)