What’s Vulnerable › Vulnerabilities
GHSA-27jp-wm6q-gp25: sqlparse: formatting list of tuples leads to denial of service
- Severity: medium (CVSS 5.5)
- Exploited in the wild: not listed in CISA KEV
- Public exploit or detection template: none known
- Published: 2026-02-13 · updated 2026-09-10
- Weakness: CWE-770
Description
### Summary The below gist hangs while attempting to format a long list of tuples. This was found while [drafting a regression test for Dja ngo 5.2's composite primary key feature](https://code.djangoproject.com/ticket/36416#comment:3), which allows querying composite fields with tuples. ###
Affected products
- Pypi Sqlparse: before 0.5.4; 0.1.0, 0.1.1, 0.1.10, 0.1.11, 0.1.12, 0.1.13 (+30) — fixed in 0.5.4
How to fix
Upgrade to a fixed version: Pypi Sqlparse 0.5.4. Check the vendor advisory for mitigations.
References
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-27jp-wm6q-gp25
- https://github.com/andialbrecht/sqlparse/commit/40ed3aa958657fa4a82055927fa9de70ab903360
- https://github.com/andialbrecht/sqlparse
- https://github.com/andialbrecht/sqlparse/releases/tag/0.5.4
Get alerted when GHSA-27jp-wm6q-gp25 or the next vulnerability affects your stack