{"id":"UBUNTU-CVE-2026-59893","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.","modified":"2026-08-19T13:32:31.657700212Z","published":"2026-08-17T18:17:00Z","upstream":["CVE-2026-59893"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-59893"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-59893"},{"type":"REPORT","url":"https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr"}],"affected":[{"package":{"name":"sqlparse","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.13-2ubuntu2","0.1.18-1"],"ecosystem_specific":{"binaries":[{"binary_name":"pypy-sqlparse","binary_version":"0.1.18-1"},{"binary_name":"python-sqlparse","binary_version":"0.1.18-1"},{"binary_name":"python3-sqlparse","binary_version":"0.1.18-1"},{"binary_name":"sqlformat","binary_version":"0.1.18-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-59893.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.2-1","0.2.4-0.1","0.2.4-0.1ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"pypy-sqlparse","binary_version":"0.2.4-0.1ubuntu0.1"},{"binary_version":"0.2.4-0.1ubuntu0.1","binary_name":"python-sqlparse"},{"binary_name":"python3-sqlparse","binary_version":"0.2.4-0.1ubuntu0.1"},{"binary_name":"sqlformat","binary_version":"0.2.4-0.1ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-59893.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.4-1","0.2.4-1build1","0.2.4-2","0.2.4-3","0.2.4-3ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"pypy-sqlparse","binary_version":"0.2.4-3ubuntu0.1"},{"binary_name":"python3-sqlparse","binary_version":"0.2.4-3ubuntu0.1"},{"binary_name":"sqlformat","binary_version":"0.2.4-3ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-59893.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.1-1ubuntu1","0.4.2-1","0.4.2-1ubuntu0.22.04.1","0.4.2-1ubuntu0.22.04.2"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-sqlparse","binary_version":"0.4.2-1ubuntu0.22.04.2"},{"binary_name":"sqlformat","binary_version":"0.4.2-1ubuntu0.22.04.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-59893.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.2-1ubuntu1","0.4.4-1","0.4.4-1ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-sqlparse","binary_version":"0.4.4-1ubuntu0.1"},{"binary_name":"sqlformat","binary_version":"0.4.4-1ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-59893.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/sqlparse?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.3-1","0.5.4-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-sqlparse","binary_version":"0.5.4-1"},{"binary_name":"sqlformat","binary_version":"0.5.4-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-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"},{"type":"Ubuntu","score":"medium"}]}