CVE-2026-53925: Glances 4.0.8–4.5.4 Arbitrary Command Execution via Unvalidated Configuration
Glances, a popular open-source system monitoring tool, contains a vulnerability in versions 4.0.8 through 4.5.4 that allows local attackers with configuration file access to execute arbitrary commands or write to arbitrary files. The issue stems from improper handling of shell metacharacters (>, |, &&) in command configurations. When Glances loads monitoring commands from its configuration file, it fails to validate or escape these special characters, enabling an attacker to redirect output to sensitive files, chain malicious commands, or pipe data to unauthorized programs. This is a local attack requiring file modification privileges but poses significant risk in multi-user or containerized environments.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-22
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-25
NVD description (verbatim)
Glances is an open-source system cross-platform monitoring tool. From 4.0.8 until 4.5.5, 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 |). This vulnerability is fixed in 4.5.5.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The secure_popen() function in glances/secure.py processes command strings from the Application Monitoring Process (AMP) module configuration without sanitizing shell metacharacters. Specifically, the > (output redirection), | (pipe), and && (command chaining) operators are interpreted and executed by the underlying shell. When AMP modules read their command and service_cmd values from glances.conf, these unsanitized strings are passed directly to secure_popen(). An attacker capable of modifying glances.conf can inject shell operators to write arbitrary content to filesystem paths, execute additional commands in sequence, or route command output to attacker-controlled programs. The vulnerability affects all releases from 4.0.8 through 4.5.4; version 4.5.5 and later contain the fix.
Business impact
In environments where Glances runs with elevated privileges or where multiple users share access to configuration files, this vulnerability enables privilege escalation or lateral movement. An attacker could overwrite critical application or system files, plant backdoors, exfiltrate monitoring data, or disrupt service availability. For organizations relying on Glances in production monitoring stacks, this creates an urgent remediation need, particularly in containerized deployments where configuration management may be less restricted.
Affected systems
Glances versions 4.0.8 through 4.5.4 are affected. The vulnerability is present across all supported platforms (Linux, macOS, Windows) where Glances runs. Risk is highest where: (1) Glances operates with elevated or service-level privileges, (2) configuration files are writable by lower-privileged users or exposed in shared environments, (3) Glances is deployed in container orchestration platforms with loose file permission controls.
Exploitability
Exploitation requires local file access to modify glances.conf, limiting this to authenticated local users or container escape scenarios. The attack requires no user interaction and succeeds immediately upon Glances restart or configuration reload. The barrier to exploitation is moderate for insiders or compromised accounts but low for anyone with write access to the config directory. No network component; this is a pure local privilege escalation or data integrity attack.
Remediation
Upgrade Glances to version 4.5.5 or later immediately. Prior to upgrade, restrict write permissions on glances.conf to the Glances service account only and audit recent configuration changes for signs of tampering. For organizations unable to upgrade immediately, disable or remove AMP module commands from the configuration and rely on native Glances sensors until patching is complete.
Patch guidance
Update Glances via your package manager (pip, apt, brew, etc.) to 4.5.5 or newer. Verify the installed version with `glances --version`. If Glances is containerized, rebuild container images from updated base package versions. No configuration changes are required post-patch, but review glances.conf for any suspicious command entries that may have been injected prior to patching.
Detection guidance
Monitor for modification timestamps on glances.conf files, particularly changes made by non-service accounts. Log and alert on Glances configuration reload events, especially if followed by unexpected file writes or child process spawning. Inspect glances.conf for unusual shell metacharacters (>, |, &&) in command or service_cmd fields—these are rarely legitimate in monitoring configurations. Review system audit logs for file writes to sensitive directories coinciding with Glances process execution.
Why prioritize this
Although exploitation requires local access, the severity is high due to the scope of impact (arbitrary file write and command execution) combined with the high likelihood of successful exploitation once access is obtained. In shared or containerized environments, this represents a critical privilege escalation vector. The fix is straightforward and low-risk, warranting rapid deployment.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects high impact (confidentiality, integrity, availability all affected), low attack complexity, and local attack vector. The score appropriately accounts for the requirement of local privilege (PR:L) but correctly weights the severity of unrestricted file system and command execution once that privilege is leveraged.
Frequently asked questions
Is this vulnerability remotely exploitable?
No. Exploitation requires local file system access to modify glances.conf. Remote exploitation is not possible unless an attacker first gains local code execution or file write access through a separate vulnerability.
Do I need to update if Glances is only used for personal monitoring on a standalone machine?
If the machine is single-user and you are the sole operator, risk is lower but not zero—a local privilege escalation from another service or malware could leverage this. Update to 4.5.5 regardless to maintain defense-in-depth.
What if I use Glances in a read-only container or with immutable configuration?
If glances.conf is mounted read-only or generated from a secure source, exploitation becomes significantly harder. However, upgrading remains the safest approach. Verify that your container orchestration platform prevents configuration modification by unprivileged users.
Are there any known public exploits?
As of the publication date, KEV status is not listed, indicating no known active exploitation in the wild. However, the attack is straightforward and the fix is available, so delays in patching increase exposure risk.
This analysis is provided for informational purposes and represents a point-in-time assessment based on publicly available information as of the publication date. Organizations should conduct their own risk assessment based on their deployment architecture and threat model. Patch availability and version numbers are accurate at publication; verify against official vendor advisories before deployment. SEC.co makes no warranty regarding the completeness or accuracy of this analysis and assumes no liability for actions taken in reliance on this information. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2016-20076HIGHWordPress Simple-Backup 2.7.11 Unauthenticated File Access & Deletion Vulnerability
- CVE-2016-20081HIGHHB Audio Gallery Lite Path Traversal Vulnerability – Unauthenticated File Download
- CVE-2017-20248HIGHApptha Slider Gallery Path Traversal Vulnerability
- CVE-2017-20250HIGHMac Photo Gallery 3.0 Path Traversal File Download Vulnerability
- CVE-2018-25408HIGHOpen ISES Project Path Traversal Vulnerability (High Severity)
- CVE-2024-32729HIGHPath Traversal in QuantumCloud Conversational Forms for ChatBot (CVSS 7.5)
- CVE-2024-40646HIGHVertex Path Traversal Vulnerability – Remote File Access Risk
- CVE-2025-60223HIGHWPBot Pro Arbitrary File Deletion Vulnerability – HIGH Risk Exploit