Skip to main content

GHSA-27jp-wm6q-gp25 — Vulnerability in sqlparse — Advisory Details

MEDIUM

sqlparse: formatting list of tuples leads to denial of service

Published February 13, 2026Updated September 10, 2026Source: OSV

Does your project use an affected sqlparse version?

Paste your requirements.txt to check it for GHSA-27jp-wm6q-gp25 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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, which allows querying composite fields with tuples.

Advisory Timeline

  • First published February 13, 2026 (286 days ago).
  • Last revised September 10, 2026 — 208 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update sqlparse to 0.5.4 or later
pip install "sqlparse>=0.5.4"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
sqlparse PyPI · Affected: 0.1.0, 0.1.1, 0.1.10, 0.1.11 (+32 more)0.5.4

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-770
    Allocation of Resources Without LimitsMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Frequently Asked Questions

What is GHSA-27jp-wm6q-gp25?
sqlparse: formatting list of tuples leads to denial of service. This vulnerability has been assigned a severity rating of MEDIUM.
How do I check if my project is affected by GHSA-27jp-wm6q-gp25?
GHSA-27jp-wm6q-gp25 affects sqlparse. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-27jp-wm6q-gp25 and 200,000+ other known vulnerabilities.

Severity & Exploitability

Related CVEs

  • CVE-2024-4340
    HIGH

    sqlparse parsing heavily nested list leads to Denial of Service

  • CVE-2026-59894
    HIGH

    sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes

  • CVE-2024-4340
    HIGH

    sqlparse parsing heavily nested list leads to Denial of Service

  • CVE-2026-71491
    HIGH

    sqlparse: Quadratic O(n²) DoS in group_comments

  • CVE-2026-59893
    HIGH

    sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)

  • CVE-2026-54284
    HIGH

    sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger

  • CVE-2026-59894
    MEDIUM

    sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes

  • CVE-2026-84305
    MEDIUM

    sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt