{"id":"CVE-2023-30608","aliases":["CVE-2023-30608","GHSA-rrm6-wvj7-cwh2","PYSEC-2023-87"],"related":[],"kind":"vulnerability","state":"published","title":"Parser contains an inefficient regular expression in sqlparse","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe SQL parser contains a regular expression that is vulnerable to [ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) (Regular Expression Denial of Service). The vulnerability may lead to Denial of Service (DoS).\n\n### Patches\nThis issues has been fixed in sqlparse 0.4.4.\n\n### Workarounds\nNone. \n\n### References\nThis issue was discovered and reported by GHSL team member [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh).\n- Commit that introduced the vulnerability: e75e35869473832a1eb67772b1adfee2db11b85a","format":"markdown","source":"ghsa"}],"published":"2023-04-18T21:32:11.145Z","modified":"2026-06-17T05:55:07.650Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":">= 0.1.15, < 0.4.4","status":"affected"}],"vendor":"andialbrecht","product":"sqlparse","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.1.15","status":"affected","fixed":"0.4.4"}],"ecosystem":"PyPI","package":"sqlparse","purl":"pkg:pypi/sqlparse","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.1.15","fixed":"0.4.4"}],"vendor":"sqlparse_project","product":"sqlparse","cpe":"cpe:2.3:a:sqlparse_project:sqlparse:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"c457abd5f097dd13fb21543381e7cfafe7d31cfb"},{"type":"git","status":"affected","fixed":"e75e35869473832a1eb67772b1adfee2db11b85a"},{"type":"ecosystem","introduced":"0.1.15","status":"affected","fixed":"0.4.4"}],"ecosystem":"PyPI","package":"sqlparse","purl":"pkg:pypi/sqlparse","repo":"https://github.com/andialbrecht/sqlparse","source":"pysec"}],"references":[{"url":"https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-rrm6-wvj7-cwh2","tags":["advisory","patch","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/andialbrecht/sqlparse/commit/c457abd5f097dd13fb21543381e7cfafe7d31cfb","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/andialbrecht/sqlparse/commit/e75e35869473832a1eb67772b1adfee2db11b85a","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS","tags":["technical-description","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/05/msg00017.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00022.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-30608","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/andialbrecht/sqlparse","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/sqlparse/PYSEC-2023-87.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-02-06T16:35:46.370Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-30608","url":"https://www.cve.org/CVERecord?id=CVE-2023-30608","licence":"CVE Terms of Use","modified":"2025-11-03T21:48:07.853Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rrm6-wvj7-cwh2","url":"https://github.com/advisories/GHSA-rrm6-wvj7-cwh2","licence":"CC-BY-4.0","modified":"2025-11-04T17:36:56.468Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-30608","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-30608","licence":"Public domain","modified":"2026-06-17T05:55:07.650Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-87","url":"https://osv.dev/vulnerability/PYSEC-2023-87","licence":"CC-BY-4.0","modified":"2023-11-08T04:12:25.842Z"}],"updatedAt":"2026-11-25T22:58:23.625Z","epss":{"score":0.0098,"percentile":0.63223,"date":"2026-12-01T12:00:22.000Z"}}