{"id":"CVE-2026-59893","summary":"sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)","details":"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.","aliases":["GHSA-prg7-hcfm-mfcr","PYSEC-2026-3698"],"modified":"2026-08-21T09:27:00.181144443Z","published":"2026-08-17T17:41:36.621Z","related":["CGA-hqf4-h7m5-8g92","openSUSE-SU-2026:11557-1"],"database_specific":{"cwe_ids":["CWE-1333"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59893.json","cna_assigner":"GitHub_M"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59893.json"},{"type":"ADVISORY","url":"https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59893"},{"type":"FIX","url":"https://github.com/andialbrecht/sqlparse/commit/d1d80602741f77ec78e5a04ce4719244cf32352e"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/andialbrecht/sqlparse","events":[{"introduced":"0"},{"fixed":"d1d80602741f77ec78e5a04ce4719244cf32352e"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"0.6.0"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"versions":["0.5.5","0.5.4","0.5.3","0.5.2","0.5.1","0.5.0","0.4.4","0.4.3","0.4.2","0.4.1","0.4.0","0.3.1","0.3.0","0.2.4","0.2.3","0.2.2","0.2.1","0.2.0","0.1.18","0.1.17","0.1.16","0.1.15","0.1.14","0.1.13","0.1.12","0.1.11","0.1.10","0.1.9","0.1.8","0.1.7","0.1.6","0.1.5","0.1.3","0.1.2","0.1.1","0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-59893.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}