# CVE-2026-71491: pypy-sqlparse: sqlparse is a non-validating SQL parser module for Python

CVE-2026-71491 is fixed in 4 products on 1 platform, first by pypy-sqlparse 0.2.4-0.1ubuntu0.1+esm1, released August 17, 2026. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2026-71491
- Priority: High
- CVSS: 7.5 (Medium)
- EPSS: 0.0026
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Aug 17, 2026

## Description

sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, group_comments in sqlparse/engine/grouping.py repeatedly rescans comment-only statements before the MAX_GROUPING_TOKENS guard, causing quadratic CPU consumption through sqlparse.parse() and sqlparse.format(sql, strip_comments=True). This issue is fixed in version 0.6.0.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | pypy-sqlparse Ubuntu 18.04.6 LTS (bionic) | 0.2.4-0.1ubuntu0.1+esm1 | [pypy-sqlparse 0.2.4-0.1ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-pypy-sqlparse-0.2.4-0.1ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | pypy-sqlparse Ubuntu 20.04 LTS (focal) | 0.2.4-3ubuntu0.1+esm1 | [pypy-sqlparse 0.2.4-3ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-pypy-sqlparse-0.2.4-3ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | python-sqlparse RHEL 10 | 0.6.0-1.el10ap | [RHSA-2026:71112](https://patchblox.com/security/data/fix/linux/rhsa-2026-71112.md) | Aug 17, 2026 |
| Linux | python-sqlparse Ubuntu 18.04.6 LTS (bionic) | 0.2.4-0.1ubuntu0.1+esm1 | [python-sqlparse 0.2.4-0.1ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python-sqlparse-0.2.4-0.1ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | python-sqlparse opensuse-leap 16.0 | 0.5.3-160000.4.1 | [OPENSUSE-SU-2026:21690-1](https://patchblox.com/security/data/fix/linux/opensuse-su-2026-21690-1.md) | Aug 30, 2026 |
| Linux | python-sqlparse sles 15.6 | 0.4.4-150600.3.9.1 | [SUSE-SU-2026:3907-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-3907-1.md) | Sep 1, 2026 |
| Linux | python-sqlparse sles 15.7 | 0.4.4-150600.3.9.1 | [SUSE-SU-2026:3907-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-3907-1.md) | Sep 1, 2026 |
| Linux | python-sqlparse sles 16.0 | 0.5.3-160000.4.1 | [SUSE-SU-2026:23561-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-23561-1.md) | Aug 30, 2026 |
| Linux | python3-sqlparse Ubuntu 18.04.6 LTS (bionic) | 0.2.4-0.1ubuntu0.1+esm1 | [python3-sqlparse 0.2.4-0.1ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3-sqlparse-0.2.4-0.1ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | python3-sqlparse Ubuntu 20.04 LTS (focal) | 0.2.4-3ubuntu0.1+esm1 | [python3-sqlparse 0.2.4-3ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-python3-sqlparse-0.2.4-3ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | python3-sqlparse Ubuntu 22.04.1 LTS (jammy) | 0.4.2-1ubuntu0.22.04.3 | [python3-sqlparse 0.4.2-1ubuntu0.22.04.3](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-python3-sqlparse-0.4.2-1ubuntu0.22.04.3.md) | Aug 17, 2026 |
| Linux | python3-sqlparse Ubuntu 24.04.5 LTS (noble) | 0.4.4-1ubuntu0.2 | [python3-sqlparse 0.4.4-1ubuntu0.2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-python3-sqlparse-0.4.4-1ubuntu0.2.md) | Aug 17, 2026 |
| Linux | python3-sqlparse Ubuntu 26.04.1 LTS (resolute) | 0.5.4-1ubuntu0.1 | [python3-sqlparse 0.5.4-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-python3-sqlparse-0.5.4-1ubuntu0.1.md) | Aug 17, 2026 |
| Linux | python3-sqlparse sles 15.6 | 0.4.2-150300.23.1 | [SUSE-SU-2026:3906-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-3906-1.md) | Sep 1, 2026 |
| Linux | python3-sqlparse sles 15.7 | 0.4.2-150300.23.1 | [SUSE-SU-2026:3906-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-3906-1.md) | Sep 1, 2026 |
| Linux | sqlformat Ubuntu 18.04.6 LTS (bionic) | 0.2.4-0.1ubuntu0.1+esm1 | [sqlformat 0.2.4-0.1ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-sqlformat-0.2.4-0.1ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | sqlformat Ubuntu 20.04 LTS (focal) | 0.2.4-3ubuntu0.1+esm1 | [sqlformat 0.2.4-3ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-sqlformat-0.2.4-3ubuntu0.1-esm1.md) | Aug 17, 2026 |
| Linux | sqlformat Ubuntu 22.04.1 LTS (jammy) | 0.4.2-1ubuntu0.22.04.3 | [sqlformat 0.4.2-1ubuntu0.22.04.3](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-sqlformat-0.4.2-1ubuntu0.22.04.3.md) | Aug 17, 2026 |
| Linux | sqlformat Ubuntu 24.04.5 LTS (noble) | 0.4.4-1ubuntu0.2 | [sqlformat 0.4.4-1ubuntu0.2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-sqlformat-0.4.4-1ubuntu0.2.md) | Aug 17, 2026 |
| Linux | sqlformat Ubuntu 26.04.1 LTS (resolute) | 0.5.4-1ubuntu0.1 | [sqlformat 0.5.4-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-sqlformat-0.5.4-1ubuntu0.1.md) | Aug 17, 2026 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
