CVE-2021-32839

Published on: 09/20/2021 12:00:00 AM UTC

Last Modified on: 09/29/2021 03:04:00 PM UTC

CVE-2021-32839 - advisory for GHSA-p5w8-wqhj-9hhf

Source: Mitre Source: Nist Print: PDF PDF
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Certain versions of Sqlparse from Sqlparse Project contain the following vulnerability:

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.

  • CVE-2021-32839 has been assigned by URL Logo [email protected] to track the vulnerability - currently rated as HIGH severity.
  • Affected Vendor/Software: URL Logo andialbrecht - sqlparse version >= 0.4.0, < 0.4.2

CVSS3 Score: 7.5 - HIGH

Attack
Vector
Attack
Complexity
Privileges
Required
User
Interaction
NETWORK LOW NONE NONE
Scope Confidentiality
Impact
Integrity
Impact
Availability
Impact
UNCHANGED NONE NONE HIGH

CVSS2 Score: 5 - MEDIUM

Access
Vector
Access
Complexity
Authentication
NETWORK LOW NONE
Confidentiality
Impact
Integrity
Impact
Availability
Impact
NONE NONE PARTIAL

CVE References

Description Tags Link
StripComments filter contains a regular expression that is vulnerable to ReDOS (Regular Expression Denial of Service) · Advisory · andialbrecht/sqlparse · GitHub github.com
text/html
URL Logo CONFIRM github.com/andialbrecht/sqlparse/security/advisories/GHSA-p5w8-wqhj-9hhf
Optimize regular expression for identifying line breaks in comments. · andialbrecht/[email protected] · GitHub github.com
text/html
URL Logo MISC github.com/andialbrecht/sqlparse/commit/8238a9e450ed1524e40cb3a8b0b3c00606903aeb

Related QID Numbers

  • 198509 Ubuntu Security Notification for SQL parse Vulnerability (USN-5085-1)

Known Affected Configurations (CPE V2.3)

Type Vendor Product Version Update Edition Language
ApplicationSqlparse ProjectSqlparseAllAllAllAll
  • cpe:2.3:a:sqlparse_project:sqlparse:*:*:*:*:*:*:*:*:

Social Mentions

Source Title Posted (UTC)
Twitter Icon @CVEreport CVE-2021-32839 : sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 t… twitter.com/i/web/status/1… 2021-09-20 17:14:53
© CVE.report 2021 Twitter Nitter Twitter Viewer |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report