Python
CVE-2026-33641
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessModify Glances config file with backtick commands
-
ExploitGlances parses config during startup
-
ExecutionExecute arbitrary system commands
-
ImpactGain privileges of Glances process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must modify Glances configuration files (e.g., glances.conf) to inject backtick-enclosed system commands. Requires local access with privileges to write configuration files. Exploitation occurs automatically during Glances startup or configuration reload. Risk amplified if Glances runs as system service with elevated privileges. |
| Impact | Real-world risk is moderate to high depending on deployment context. The CVSS vector (AV:L/AC:L/PR:L/UI:N) indicates local attack requiring low privileges with low complexity and no user interaction, resulting in complete system compromise (C:H/I:H/A:H). However, exploitation requires pre-existing write access to Glances configuration files, significantly limiting the attack surface compared to remote vulnerabilities. Risk escalates dramatically in multi-user systems with permissive file permissions, containerized deployments with mounted config volumes, or when Glances runs as a privileged systemd service. The publicly available exploit code in GitHub advisory GHSA-qhj7-v7h7-q4c7 lowers the technical barrier for attackers. No EPSS score or CISA KEV status indicates this is not yet widely exploited in the wild. Primary risk scenarios include lateral movement after initial compromise, privilege escalation in shared hosting environments, and supply chain attacks via configuration management systems ingesting untrusted data. Organizations running Glances with default permissions on single-user workstations face minimal risk, while production monitoring infrastructure with elevated privileges requires immediate patching. |
| Exploit ScenarioDerived | An attacker gains low-privileged shell access to a Linux server running Glances as a systemd service with root privileges for comprehensive system monitoring. The attacker discovers the Glances configuration directory /etc/glances/ has overly permissive group-write permissions due to misconfiguration. They create a malicious glances.conf file containing url_prefix=' |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 30, 2026
Command injection in Glances Python monitoring tool allows local authenticated users to execute arbitrary system commands via malicious configuration files. Attackers with write access to Glances configuration files can embed shell commands in backtick-enclosed strings that execute automatically during config parsing with the privileges of the Glances process. In environments where Glances runs as a system service with elevated privileges, this enables privilege escalation from low-privileged user to root. CVSS 7.8 (High) with local attack vector requiring low privileges. Public exploit code exists in the advisory. EPSS data not available, not listed in CISA KEV.
RemediationAI
Apply vendor-released security patches from the official Glances GitHub repository at https://github.com/nicolargo/glances/security/advisories/GHSA-qhj7-v7h7-q4c7. Specific patched version numbers are not provided in available data; consult the advisory for exact fix versions and upgrade via pip using 'pip install --upgrade glances'. As interim mitigation, restrict write access to Glances configuration files using filesystem permissions (chmod 600 for user configs, restrictive ACLs for system paths), ensuring only trusted administrators can modify glances.conf files. Remove or disable the dynamic command substitution feature if not required by commenting out backtick processing logic in config.py. Avoid running Glances with elevated privileges unless necessary; use capability-based permissions (setcap) instead of running as root. In containerized environments, mount configuration directories as read-only volumes. Audit existing configuration files for suspicious backtick-enclosed commands using 'grep -r \` /etc/glances/ ~/.config/glances/' before applying patches.
Affected Packages
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 system monitoring tool written in Python (pkg:pip/glances). The vulnerability stems from CWE-78 (OS Command Injection) in the configuration parsing logic. The Config.get_value() method in glances/config.py uses regex pattern matching to identify backtick-enclosed substrings in configuration values, then passes extracted commands directly to system_exec() in glances/globals.py without sanitization. The system_exec() function executes commands via subprocess.run() with shell word splitting, replacing the configuration value with command output. This dynamic substitution feature operates on any configuration file loaded from user directories, system paths, or custom locations specified via the -C flag. The lack of input validation, command whitelisting, or privilege checks creates an injection point exploitable by anyone with filesystem write access to configuration directories.
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
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/nicolargo/glances).
CVSS VectorVendor: https://github.com/nicolargo/glances
DescriptionCVE.org
Summary
Glances supports dynamic configuration values in which substrings enclosed in backticks are executed as system commands during configuration parsing. This behavior occurs in Config.get_value() and is implemented without validation or restriction of the executed commands.
If an attacker can modify or influence configuration files, arbitrary commands will execute automatically with the privileges of the Glances process during startup or configuration reload. In deployments where Glances runs with elevated privileges (e.g., as a system service), this may lead to privilege escalation.
Details
- Glances loads configuration files from user, system, or custom paths during initialization.
- When retrieving a configuration value, Config.get_value() scans for substrings enclosed in backticks.
File: glances/config.py
match = self.re_pattern.findall(ret)
for m in match:
ret = ret.replace(m, system_exec(m[1:-1]))- The extracted string is passed directly to system_exec().
File: glances/globals.py
res = subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')- The command is executed and its output replaces the original configuration value.
This execution occurs automatically whenever the configuration value is read.
Affected Files
glances/config.py - dynamic configuration parsing
glances/globals.py - command execution helper
Proof of Concept (PoC)
Scenario: Arbitrary command execution via configuration value
Step 1 - Create malicious configuration file
/tmp/glances.confadd below txt on the file
[outputs]
url_prefix = 'id'Step 2 - Launch Glances with custom configuration
glances -C /tmp/glances.confStep 3 - Observe behavior
When Glances reads the configuration:
- The command inside backticks is executed
- Output replaces the configuration value
- Execution occurs without user interaction
Reproduce using Python code
import subprocess
import re
def system_exec(command):
return subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode().strip()
value = "`id`"
pattern = re.compile(r'(`.+?`)')
for m in pattern.findall(value):
print(system_exec(m[1:-1]))Output:
uid=1000(user) gid=1000(user) groups=1000(user)
Impact
Arbitrary Command Execution
Any command enclosed in backticks inside a configuration value will execute with the privileges of the Glances process.
Potential Privilege Escalation
If Glances runs as a privileged service (e.g., root), commands execute with those privileges.
Possible scenarios include:
- Misconfigured file permissions allowing unauthorized config modification
- Shared systems where configuration directories are writable by multiple users
- Container environments with mounted configuration volumes
- Automated configuration management systems that ingest untrusted data
Executive ViewAI
CVE-2026-33641 is a command injection vulnerability in the Glances monitoring tool that allows authenticated local users to execute arbitrary commands through malicious configuration files, with potential for privilege escalation if Glances runs with elevated system privileges. Organizations using Glances as a system service should immediately assess exposure, as attackers with write access to configuration directories can gain elevated access matching the service's privilege level.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict write permissions on Glances configuration directories to root/service account only; deny write access to all other users and groups. (2) Run Glances with minimal necessary privileges; avoid running as root unless absolutely required. (3) Implement file integrity monitoring on configuration files to detect unauthorized modifications. (4) Use SELinux or AppArmor profiles to restrict command execution capabilities of the Glances process. (5) Monitor process execution logs for suspicious child processes spawned by Glances.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Affected Products (CPE)CVE.org
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-78 – OS Command Injection
View allSame technique Privilege Escalation
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
GHSA-qhj7-v7h7-q4c7
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB
VulDB