{"id":"UBUNTU-CVE-2023-30608","details":"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.","modified":"2026-02-04T02:26:09.431872Z","published":"2023-04-18T22:15:00Z","related":["USN-6064-1"],"upstream":["CVE-2023-30608"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2023-30608"},{"type":"REPORT","url":"https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-rrm6-wvj7-cwh2"},{"type":"REPORT","url":"https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6064-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2023-30608"}],"affected":[{"package":{"name":"sqlparse","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/sqlparse@0.2.4-0.1ubuntu0.1?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.4-0.1ubuntu0.1"}]}],"versions":["0.2.2-1","0.2.4-0.1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"pypy-sqlparse","binary_version":"0.2.4-0.1ubuntu0.1"},{"binary_name":"python-sqlparse","binary_version":"0.2.4-0.1ubuntu0.1"},{"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/2023/UBUNTU-CVE-2023-30608.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/sqlparse@0.2.4-3ubuntu0.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.4-3ubuntu0.1"}]}],"versions":["0.2.4-1","0.2.4-1build1","0.2.4-2","0.2.4-3"],"ecosystem_specific":{"availability":"No subscription required","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/2023/UBUNTU-CVE-2023-30608.json"}},{"package":{"name":"sqlparse","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/sqlparse@0.4.2-1ubuntu0.22.04.1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.2-1ubuntu0.22.04.1"}]}],"versions":["0.4.1-1ubuntu1","0.4.2-1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"python3-sqlparse","binary_version":"0.4.2-1ubuntu0.22.04.1"},{"binary_name":"sqlformat","binary_version":"0.4.2-1ubuntu0.22.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30608.json"}}],"schema_version":"1.7.3","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":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}