Vulnerability Description
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.
CVSS Score
HIGH
Related Weaknesses (CWE)
References
- https://github.com/andialbrecht/sqlparse/commit/d1d80602741f77ec78e5a04ce4719244
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr
FAQ
What is CVE-2026-59893?
CVE-2026-59893 is a vulnerability with a CVSS score of 7.5 (HIGH). 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 lite...
How severe is CVE-2026-59893?
CVE-2026-59893 has been rated HIGH with a CVSS base score of 7.5/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-59893?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.