Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-32839

published high CVSS 3.1 · 7.5

Regular Expression Denial of Service in sqlparse

Published
20 Sep 2021, 17:10:12 UTC
Updated
03 Nov 2025, 21:44:47 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
andialbrecht — sqlparse>= 0.4.0, < 0.4.2 Affected Not stated GitHub_M
Debian bullseye sqlparse Advisory build 0.4.1-1+deb11u1 DLA-4000-1
Alpine Linux edge py3-sqlparse Fixed 0.4.2-r0 Package fix record
SUSE / openSUSE SLE-15-SP3 python3-sqlparsenoarch Advisory build 0.4.2-3.3.1 SUSE-SU-2021:3857-1
Rocky Linux 8 libdbsrc Listed in advisory Not stated RLSA-2022:5498
Alpine Linux v3.14 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.15 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.16 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Show 48 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Alpine Linux v3.17 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.18 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.19 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.20 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.21 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.22 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.23 py3-sqlparse Fixed 0.4.2-r0 Package fix record
Alpine Linux v3.24 py3-sqlparse Fixed 0.4.2-r0 Package fix record
SUSE / openSUSE openSUSE-Leap-15.3 python3-sqlparsenoarch Advisory build 0.4.2-3.3.1 OPENSUSE-SU-2021:3857-1
SUSE / openSUSE openSUSE-Tumbleweed python310-sqlparseaarch64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python310-sqlparseppc64le Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python310-sqlparses390x Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python310-sqlparsex86_64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python311-sqlparseaarch64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python311-sqlparseppc64le Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python311-sqlparses390x Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python311-sqlparsex86_64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python312-sqlparseaarch64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python312-sqlparseppc64le Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python312-sqlparses390x Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python312-sqlparsex86_64 Advisory build 0.5.0-1.1 OPENSUSE-SU-2024:13938-1
SUSE / openSUSE openSUSE-Tumbleweed python313-sqlparseaarch64 Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python313-sqlparseppc64le Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python313-sqlparses390x Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python313-sqlparsex86_64 Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python314-sqlparseaarch64 Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python314-sqlparseppc64le Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python314-sqlparses390x Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python314-sqlparsex86_64 Advisory build 0.5.5-2.1 OPENSUSE-SU-2026:11221-1
SUSE / openSUSE openSUSE-Tumbleweed python36-sqlparseaarch64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python36-sqlparseppc64le Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python36-sqlparses390x Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python36-sqlparsex86_64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python38-sqlparseaarch64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python38-sqlparseppc64le Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python38-sqlparses390x Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python38-sqlparsex86_64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python39-sqlparseaarch64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python39-sqlparseppc64le Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python39-sqlparses390x Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
SUSE / openSUSE openSUSE-Tumbleweed python39-sqlparsex86_64 Advisory build 0.4.2-1.1 OPENSUSE-SU-2024:11581-1
Rocky Linux 8 libdb-cxxx86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-cxx-debuginfox86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-debuginfox86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-debugsourcex86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-sql-debuginfox86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-sql-devel-debuginfox86_64 Listed in advisory Not stated RLSA-2022:5498
Rocky Linux 8 libdb-utils-debuginfox86_64 Listed in advisory Not stated RLSA-2022:5498

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

19

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.5 / 10
Severity
high
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
andialbrecht sqlparse >= 0.4.0, < 0.4.2 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-400 CWE-400 Uncontrolled Resource Consumption (GitHub_M · cna)

References

3

Provider assertions

2

GitHub_M · cna

Regular Expression Denial of Service in sqlparse

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
c7b1e886582fc68b4ed7318c523da4b09650ad2c835129ec78a64e3daa75a7eb
Ingested
23 Sep 2026, 07:54:30 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected