Glances has CQL Injection in its Cassandra Export Module via Unsanitized Config Values
Summary
The Cassandra export module (glances/exports/glances_cassandra/__init__.py) interpolates keyspace, table, and replication_factor 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
# Line 80
f"CREATE KEYSPACE {self.keyspace} WITH "
f"replication = {{ 'class': 'SimpleStrategy', 'replication_factor': '{self.replication_factor}' }}"
# 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
- Configure
glances.confwith malicioustablevalue:
[cassandra]
host = 127.0.0.1
port = 9042
keyspace = glances
table = attacker_ks.captured_stats
- Create attacker keyspace in Cassandra
- Run
glances --export cassandra - All monitoring data is written to
attacker_ks.captured_statsinstead of the legitimate table
Confirmed output:
INSERT stmt: INSERT INTO attacker_ks.captured_stats (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
import re
def _validate_cql_identifier(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 = _validate_cql_identifier(self.keyspace)
self.table = _validate_cql_identifier(self.table)

Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Python (PyPI) | glances | < 4.5.4 | 4.5.4 |
Odnośniki
- https://github.com/nicolargo/glances/commit/d339181f03a14bb15506307e9d58f876e23d8160
- https://github.com/nicolargo/glances/commit/e41b665576f9fd5374e3152078726cc59a01e48c
- https://github.com/nicolargo/glances/security/advisories/GHSA-grp3-h8m8-45p7
- https://nvd.nist.gov/vuln/detail/CVE-2026-35588
- https://github.com/nicolargo/glances
- Wektor CVSS
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L- Słabość (CWE)
CWE-89- Platforma
- Python (PyPI)
- Paczka
glances- Ujawniono
- 21.04.2026
- Aktualizacja
- 11.10.2026 13:19
Źródła i licencje
OSV / GitHub Advisory Database - PYSEC-2026-2177 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-grp3-h8m8-45p7 - CC BY 4.0
Historia podatności: glances
Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 26
- Pierwsza → ostatnia
- 07.2021 08.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Krytyczna 1
- Wysoka 19
- Średnia 6
Ujawnienia w latach
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 25
-
Glances has CQL Injection in its Cassandra Export Module via Unsanitized Config Values ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.