CVE-2026-59893

NameCVE-2026-59893
Descriptionsqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, SQL_REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py repeatedly scan unmatched dollar-quoted literal and multiline-comment delimiters, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This issue is fixed in version 0.6.0.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
sqlparse (PTS)bullseye0.4.1-1vulnerable
bullseye (security)0.4.1-1+deb11u1vulnerable
bookworm0.4.2-1+deb12u1vulnerable
trixie0.5.3-1vulnerable
forky, sid0.5.5-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
sqlparsesource(unstable)(unfixed)

Notes

https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-prg7-hcfm-mfcr
Fixed by: https://github.com/andialbrecht/sqlparse/commit/d1d80602741f77ec78e5a04ce4719244cf32352e (0.6.0)

Search for package or bug name: Reporting problems