Resource exhaustion in Andialbrecht Sqlparse
CVE-2021-32839
sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.
Vulnerability class: DoS (Denial of Service)
EPSS: 0.023 (81.5th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
Affected products
- Andialbrecht Sqlparse — versions >= 0.4.0, < 0.4.2
- Sqlparse_project Sqlparse
Weakness classification (CWE)
Public proof-of-concept exploits
References
- security-advisories@github.com (x_refsource_CONFIRM, Third Party Advisory)
- security-advisories@github.com (Patch, Third Party Advisory, x_refsource_MISC)
- af854a3a-2127-422b-91ae-364da2661108
Frequently asked questions
- What is CVE-2021-32839?
- CVE-2021-32839 is a high-severity vulnerability in Andialbrecht Sqlparse, classified under Uncontrolled Resource Consumption. CVSS score: 7.5/10. Published 2021-09-20.
- How severe is CVE-2021-32839?
- High severity. CVSS v3 base score is 7.5 out of 10.
- Is CVE-2021-32839 known to be exploited?
- 2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.