Resource Exhaustion Affecting sqlparse package, versions <0.4.2-1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
2.34% (83rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN13-SQLPARSE-5695860
  • published21 Sept 2021
  • disclosed20 Sept 2021

Introduced: 20 Sep 2021

CVE-2021-32839  (opens in a new tab)
CWE-400  (opens in a new tab)

How to fix?

Upgrade Debian:13 sqlparse to version 0.4.2-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream sqlparse package and not the sqlparse package as distributed by Debian. See How to fix? for Debian:13 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1