Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 4, published 13 February 2026.
- Which products and versions are affected?
- sqlparse (PyPI) ECOSYSTEM:introduced=0,fixed=0.5.4.
- Is there a fix for This vulnerability?
- Yes. sqlparse (PyPI): upgrade to 0.5.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run sqlparse (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- sqlparse (PyPI): upgrade to 0.5.4 or later
pip install "sqlparse>=0.5.4"
Technical details
A denial-of-service vulnerability exists in sqlparse's tuple formatting logic due to inefficient recursion or iteration when processing large parenthesized tuple lists (CWE-770: Allocation of Resources Without Limits or Throttling). The vulnerability is triggered when the library attempts to format SQL containing multiple nested or sequential tuples, such as "IN ((1,1), (1,2), ..., (1,N))" with many entries. The attack vector is network-based if sqlparse is used in a web application or API to format user-supplied SQL. No authentication is required. An attacker can cause the process to hang indefinitely, consuming CPU resources and preventing legitimate requests from being processed. The vulnerability was patched in version 0.5.4 by adding hard limits for grouping operations to prevent resource exhaustion.
Affected products
- sqlparse sqlparse <=0.5.3
Timeline
- 2026-02-13: disclosed
- 2026-02-13: patched: Fixed in version 0.5.4