Security mailing lists by PureSourceCode

CVE-2026-71491

HIGH 8.7CVSS 4.0

sqlparse: Quadratic O(n²) DoS in group_comments

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.

Published
17 Aug 2026
Last modified
23 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-400CWE-407
Also known as
GHSA-f2ff-p2ww-7p4pPYSEC-2026-3697
Sources
NVDJSONOSV GHSA-f2ff-p2ww-7p4pJSONOSV PYSEC-2026-3697JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 4.0 HIGH 8.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
OSV GitHub CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
OSV PyPA CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV PyPI sqlparse < 0.6.0 0.6.0

References

History

  • 25 Nov 2026 21:04 UTC · NVD: first stored (published 17 Aug 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 Aug 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 17 Aug 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.