CVSS 3.1
7.5 highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HHigh (7.5) in sqlparse project sqlparse. EPSS 2.3% estimated probability of exploitation activity in the next 30 days. Fixed in sqlparse 0.4.2.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hsqlparse (PyPI): fixed in 0.4.2Explain CVE-2021-32839 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-32839?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-32839?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-32839 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| sqlparse_project:sqlparse | from 0.4.0 before 0.4.2 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-p5w8-wqhj-9hhf | PyPI | sqlparse | >=0.4.0 <0.4.2 | 0.4.2 |
| PYSEC-2021-333 | PyPI | sqlparse | >=0.4.0 <0.4.2 | 0.4.2 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 11 | sqlparse | 0.4.1-1+deb11u1 | DLA-4000-1 |
| Debian | 12, 13, 14 | sqlparse | 0.4.2-1 | DEBIAN-CVE-2021-32839 |
| Ubuntu | 22.04:LTS | sqlparse | 0.4.1-1ubuntu1 | UBUNTU-CVE-2021-32839 |
| Red Hat | satellite:6.11::el7 | candlepin | 0:4.1.13-1.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7 | tfm-rubygem-actionpack | 0:6.0.4.7-1.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7 | tfm-rubygem-puma, tfm-rubygem-puma-debuginfo | 0:5.6.2-1.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7 | tfm-rubygem-sidekiq | 0:5.2.10-1.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7, satellite_capsule:6.11::el7 | libsolv | 0:0.7.22-1.el7pc | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7, satellite_capsule:6.11::el7, satellite_utils:6.11::el7 | foreman | 0:3.1.1.21-2.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el7, satellite_capsule:6.11::el7, satellite_utils:6.11::el7 | satellite | 0:6.11.0-2.el7sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el8 | candlepin | 0:4.1.13-1.el8sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el8 | rubygem-actionpack | 0:6.0.4.7-1.el8sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el8 | rubygem-puma, rubygem-puma-debuginfo, rubygem-puma-debugsource | 0:5.6.2-1.el8sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el8 | rubygem-sidekiq | 0:5.2.10-1.el8sat | RHSA-2022:5498 |
| Red Hat | satellite:6.11::el8, satellite_capsule:6.11::el8 | libsolv | 0:0.7.22-1.el8pc | RHSA-2022:5498 |
| 5 more for Red Hat in the JSON and on Red Hat's page. | ||||
| SUSE | Linux Enterprise Module for Basesystem 15 SP3 | python-sqlparse | 0.4.2-3.3.1 | SUSE-SU-2021:3857-1 |
| openSUSE | Leap 15.3 | python-sqlparse | 0.4.2-3.3.1 | openSUSE-SU-2021:3857-1 |
| openSUSE | Tumbleweed | python-sqlparse | 0.4.2-1.1 | openSUSE-SU-2024:11581-1 |
| openSUSE | Tumbleweed | python-sqlparse | 0.5.0-1.1 | openSUSE-SU-2024:13938-1 |
| openSUSE | Tumbleweed | python-sqlparse | 0.5.5-2.1 | openSUSE-SU-2026:11221-1 |
| Rocky Linux | 8 | libdb | 0:5.3.28-42.el8_4 | RLSA-2022:5498 |
| Alpine | v3.14, v3.15, v3.16 and 8 more | py3-sqlparse | 0.4.2-r0 | ALPINE-CVE-2021-32839 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.
Red Hat rates this Moderate.
As mitigation, 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.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Satellite 6.11 for RHEL 8 | python-sqlparse-0:0.4.2-2.el8pc | Fixed 2022-07-05 | RHSA-2022:5498 |
| Red Hat Ansible Automation Platform 1.2 | python-sqlparse | Affected | |
| Red Hat Ansible Automation Platform 1.2 | sqlparse | Affected | |
| Red Hat Ansible Tower 3 | sqlparse | Out of support scope | |
| Red Hat OpenStack Platform 10 (Newton) | python-sqlparse | Out of support scope | |
| Red Hat OpenStack Platform 13 (Queens) | python-sqlparse | Out of support scope | |
| Red Hat OpenStack Platform 16.1 | python-sqlparse | Not affected | |
| Red Hat OpenStack Platform 16.2 | python-sqlparse | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-32839.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.