UBUNTU-CVE-2026-54284
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, TokenList construction and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees constructed by group_parenthesis and group_case, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split() before depth and token limits terminate processing. This issue is fixed in version 0.6.0.
UBUNTU-CVE-2026-54284
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:UBUNTU-CVE-2026-54284
sqlparse
Source reference: /affected/0/package/name
- Affected versions
- 0.1.13-2ubuntu2
Source reference:
/affected/0/versions0.1.18-1Source reference:
/affected/0/versions - Fixed versions
- 0.1.18-1ubuntu0.1~esm1
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
sqlparse
Source reference: /affected/1/package/name
- Affected versions
- 0.2.2-1
Source reference:
/affected/1/versions0.2.4-0.1Source reference:
/affected/1/versions0.2.4-0.1ubuntu0.1Source reference:
/affected/1/versions - Fixed versions
- 0.2.4-0.1ubuntu0.1+esm1
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
sqlparse
Source reference: /affected/2/package/name
- Affected versions
- 0.2.4-1
Source reference:
/affected/2/versions0.2.4-1build1Source reference:
/affected/2/versions0.2.4-2Source reference:
/affected/2/versions0.2.4-3Source reference:
/affected/2/versions0.2.4-3ubuntu0.1Source reference:
/affected/2/versions - Fixed versions
- 0.2.4-3ubuntu0.1+esm1
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
sqlparse
Source reference: /affected/3/package/name
- Affected versions
- 0.4.1-1ubuntu1
Source reference:
/affected/3/versions0.4.2-1Source reference:
/affected/3/versions0.4.2-1ubuntu0.22.04.1Source reference:
/affected/3/versions0.4.2-1ubuntu0.22.04.2Source reference:
/affected/3/versions - Fixed versions
- 0.4.2-1ubuntu0.22.04.3
Source reference:
/affected/3/ranges - Prerequisites
- Not stated in this record
sqlparse
Source reference: /affected/4/package/name
- Affected versions
- 0.4.2-1ubuntu1
Source reference:
/affected/4/versions0.4.4-1Source reference:
/affected/4/versions0.4.4-1ubuntu0.1Source reference:
/affected/4/versions - Fixed versions
- 0.4.4-1ubuntu0.2
Source reference:
/affected/4/ranges - Prerequisites
- Not stated in this record
sqlparse
Source reference: /affected/5/package/name
- Affected versions
- 0.5.3-1
Source reference:
/affected/5/versions0.5.4-1Source reference:
/affected/5/versions - Fixed versions
- 0.5.4-1ubuntu0.1
Source reference:
/affected/5/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.18-1ubuntu0.1~esm1"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=esm-infra-legacy%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"versions": [
"0.1.13-2ubuntu2",
"0.1.18-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pypy-sqlparse",
"binary_version": "0.1.18-1ubuntu0.1~esm1"
},
{
"binary_name": "python-sqlparse",
"binary_version": "0.1.18-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-sqlparse",
"binary_version": "0.1.18-1ubuntu0.1~esm1"
},
{
"binary_name": "sqlformat",
"binary_version": "0.1.18-1ubuntu0.1~esm1"
}
],
"availability": "Available with Ubuntu Pro with Legacy support add-on: https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.2.4-0.1ubuntu0.1+esm1"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=esm-infra%2Fbionic",
"ecosystem": "Ubuntu:Pro:18.04:LTS"
},
"versions": [
"0.2.2-1",
"0.2.4-0.1",
"0.2.4-0.1ubuntu0.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pypy-sqlparse",
"binary_version": "0.2.4-0.1ubuntu0.1+esm1"
},
{
"binary_name": "python-sqlparse",
"binary_version": "0.2.4-0.1ubuntu0.1+esm1"
},
{
"binary_name": "python3-sqlparse",
"binary_version": "0.2.4-0.1ubuntu0.1+esm1"
},
{
"binary_name": "sqlformat",
"binary_version": "0.2.4-0.1ubuntu0.1+esm1"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.2.4-3ubuntu0.1+esm1"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=esm-infra%2Ffocal",
"ecosystem": "Ubuntu:Pro:20.04:LTS"
},
"versions": [
"0.2.4-1",
"0.2.4-1build1",
"0.2.4-2",
"0.2.4-3",
"0.2.4-3ubuntu0.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "pypy-sqlparse",
"binary_version": "0.2.4-3ubuntu0.1+esm1"
},
{
"binary_name": "python3-sqlparse",
"binary_version": "0.2.4-3ubuntu0.1+esm1"
},
{
"binary_name": "sqlformat",
"binary_version": "0.2.4-3ubuntu0.1+esm1"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.4.2-1ubuntu0.22.04.3"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"0.4.1-1ubuntu1",
"0.4.2-1",
"0.4.2-1ubuntu0.22.04.1",
"0.4.2-1ubuntu0.22.04.2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-sqlparse",
"binary_version": "0.4.2-1ubuntu0.22.04.3"
},
{
"binary_name": "sqlformat",
"binary_version": "0.4.2-1ubuntu0.22.04.3"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.4.4-1ubuntu0.2"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"0.4.2-1ubuntu1",
"0.4.4-1",
"0.4.4-1ubuntu0.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-sqlparse",
"binary_version": "0.4.4-1ubuntu0.2"
},
{
"binary_name": "sqlformat",
"binary_version": "0.4.4-1ubuntu0.2"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.5.4-1ubuntu0.1"
}
]
}
],
"package": {
"name": "sqlparse",
"purl": "pkg:deb/ubuntu/sqlparse?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"0.5.3-1",
"0.5.4-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-54284.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-sqlparse",
"binary_version": "0.5.4-1ubuntu0.1"
},
{
"binary_name": "sqlformat",
"binary_version": "0.5.4-1ubuntu0.1"
}
],
"availability": "No subscription required"
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #5797 · Revision 1
- Added to Heist Feed
- Publisher date