CVE-2021-32839

medium
Published 2021-09-10 ยท Modified 2023-11-08
CVSS v3
โ€”
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
5.5

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.

Predictions

Exploit likelihood
30%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

OS impact

OSVersionStatusFixed in
arch archfixed0.4.2-1
suse slesaffected
rockylinux rocky8fixed
debian debianbookwormfixed0.4.2-1
debian debianbullseyefixed0.4.1-1+deb11u1
debian debianforkyfixed0.4.2-1
debian debiansidfixed0.4.2-1
debian debiantrixiefixed0.4.2-1

Package impact

EcosystemPackageVulnerableFixed
python PyPIsqlparse>=0.4.0,<0.4.20.4.2
python PyPIsqlparse>=1499cffcd7c4d635b4297b44d48fb4fe94cf988e,<8238a9e450ed1524e40cb3a8b0b3c00606903aeb||>=0.4.0,<0.4.28238a9e450ed1524e40cb3a8b0b3c00606903aeb

References

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.