CVE-2021-32839
Summary
| CVE | CVE-2021-32839 |
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2021-09-20 17:15:00 UTC |
| Updated | 2021-09-29 15:04:00 UTC |
| Description | 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. |
NVD Known Affected Configurations (CPE 2.3)
References
| Reference | Source | Link | Tags |
|---|
| StripComments filter contains a regular expression that is vulnerable to ReDOS (Regular Expression Denial of Service) · Advisory · andialbrecht/sqlparse · GitHub |
CONFIRM |
github.com |
|
| Optimize regular expression for identifying line breaks in comments. · andialbrecht/sqlparse@8238a9e · GitHub |
MISC |
github.com |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 184111 Debian Security Update for sqlparse (CVE-2021-32839)
- 198509 Ubuntu Security Notification for SQL parse Vulnerability (USN-5085-1)
- 240566 Red Hat Update for Satellite 6.11 Release (RHSA-2022:5498)
- 501906 Alpine Linux Security Update for py3-sqlparse
- 751426 OpenSUSE Security Update for python-sqlparse (openSUSE-SU-2021:3857-1)
- 960505 Rocky Linux Security Update for Satellite (RLSA-2022:5498)
- 980660 Python (pip) Security Update for sqlparse (GHSA-p5w8-wqhj-9hhf)