CVE-2026-35588: Glances has CQL Injection in its Cassandra Export Module via Unsanitized Config Values
Summary
The Cassandra export module (glances/exports/glancescassandra/init.py) interpolates keyspace, table, and replicationfactor configuration values directly into CQL statements without validation. A user with write access to glances.conf can redirect all monitoring data to an attacker-controlled Cassandra keyspace.
Vulnerable Code
python Line 80 f"CREATE KEYSPACE {self.keyspace} WITH " f"replication = {{ 'class': 'SimpleStrategy', 'replicationfactor': '{self.replicationfactor}' }}"
Line 94 f"CREATE TABLE {self.table} (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) WITH CLUSTERING ORDER BY (time DESC)"
Line 112 stmt = f"INSERT INTO {self.table} (plugin, time, stat) VALUES (?, ?, ?)"
Steps to Reproduce
1. Configure glances.conf with malicious table value: ini [cassandra] host = 127.0.0.1 port = 9042 keyspace = glances table = attackerks.capturedstats 2. Create attacker keyspace in Cassandra 3. Run glances --export cassandra 4. All monitoring data is written to attackerks.capturedstats instead of the legitimate table
Confirmed output: INSERT stmt: INSERT INTO attackerks.capturedstats (plugin, time, stat) VALUES (?, ?, ?) Legitimate table row count: 0 Attacker table row count: 1 [CONFIRMED] plugin=cpu, stat={'user': 50.0}
Impact
All exported monitoring data (CPU, memory, network, disk I/O) is silently redirected to an attacker-controlled Cassandra keyspace — both data exfiltration and data loss.
Proposed Fix
python import re
def validatecqlidentifier(name: str) -> str: if not re.match(r'^[a-zA-Z][a-zA-Z0-9.]$', name): raise ValueError(f"Invalid CQL identifier: {name!r}") return name
In init(): validate before use self.keyspace = validatecqlidentifier(self.keyspace) self.table = validatecqlidentifier(self.table)
!PoC
Other sources
Glances is an open-source system cross-platform monitoring tool. Prior to version 4.5.4, the Cassandra export module (glances/exports/glancescassandra/init.py) interpolates keyspace, table, and replicationfactor configuration values directly into CQL statements without validation. A user with write access to glances.conf can redirect all monitoring data to an attacker-controlled Cassandra keyspace. Version 4.5.4 contains a fix.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-35588?
CVE-2026-35588 is considered a critical vulnerability due to its potential for CQL Injection in the Cassandra Export Module.
How do I fix CVE-2026-35588?
To fix CVE-2026-35588, update Glances to version 4.5.4 or later.
What components are affected by CVE-2026-35588?
CVE-2026-35588 affects the Cassandra export module in Glances versions prior to 4.5.4.
What type of attack is associated with CVE-2026-35588?
CVE-2026-35588 is associated with CQL Injection attacks that exploit unsanitized configuration values.
Which versions of Glances are vulnerable to CVE-2026-35588?
Versions of Glances prior to 4.5.4 are vulnerable to CVE-2026-35588.