SQL Injection in glances (CVE-2026-30930)
Summary
SQL injection in glances (CVE-2026-30930). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 4.5.1 or later.
Original description
The description as published by the source.
Summary
The TimescaleDB export module constructs SQL queries using string concatenation with unsanitized system monitoring data. The normalize() method wraps string values in single quotes but does not escape embedded single quotes, making SQL injection trivial via attacker-controlled data such as process names, filesystem mount points, network interface names, or container names.
Root Cause: The normalize() function uses f"'{value}'" for string values without escaping single quotes within the value. The resulting strings are concatenated into INSERT queries via string formatting and executed directly with cur.execute() — no parameterized queries are used.
Affected Code
- File: glances/exports/glances_timescaledb/init.py, lines 79-93 (normalize function)
def normalize(self, value):
"""Normalize the value to be exportable to TimescaleDB."""
if value is None:
return 'NULL'
if isinstance(value, bool):
return str(value).upper()
if isinstance(value, (list, tuple)):
# Special case for list of one boolean
if len(value) == 1 and isinstance(value[0], bool):
return str(value[0]).upper()
return ', '.join([f"'{v}'" for v in value])
if isinstance(value, str):
return f"'{value}'" # <-- NO ESCAPING of single quotes within value
return f"{value}"
- File: glances/exports/glances_timescaledb/init.py, lines 201-205 (query construction)
# Insert the data
insert_list = [f"({'…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-30930 has been found in glances.
Risk of unauthorized operations or information disclosure.
What to do: upgrade glances to 4.5.1 or later.
If unsure, ask your IT team or search "glances CVE-2026-30930" on the vendor's site.
CVE-2026-30930 (glances) — CWE-89
Patched: 4.5.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
SQL injection (CWE-89) exists in glances.
Check the vendor advisory for the affected versions of glances.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 4.5.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'glances' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'glances' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
glancesを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade glances to 4.5.1ステージング環境で 4.5.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-30930 glances Fixed in: 4.5.1+dfsg-1
- Ubuntu UBUNTU-CVE-2026-30930 glances
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com