CVE-2026-33641: Glances Vulnerable to Command Injection via Dynamic Configuration Values

Published Mar 30, 2026
·
Updated

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.getvalue() 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.getvalue() scans for substrings enclosed in backticks.

File: glances/config.py match = self.repattern.findall(ret) for m in match: ret = ret.replace(m, systemexec(m[1:-1]))

3. The extracted string is passed directly to systemexec().

File: glances/globals.py sh res = subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')

4. 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] urlprefix = '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 systemexec(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(systemexec(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

Other sources

Glances is an open-source system cross-platform monitoring tool. Prior to version 4.5.3, Glances supports dynamic configuration values in which substrings enclosed in backticks are executed as system commands during configuration parsing. This behavior occurs in Config.getvalue() 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. This issue has been patched in version 4.5.3.

NVD

Affected Software

2 affected components
pip/Glances<=4.5.2
nicolargo Glances<4.5.3

Event History

Mar 30, 2026
Advisory Published
via GitHub·05:01 PM
Data Sourced
via GitHub·05:01 PM
DescriptionSeverityWeaknessAffected Software
Apr 2, 2026
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 13, 2026
Exploit Published
via ExploitDB·12:00 AM
Known Exploited
02:49 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-33641?

CVE-2026-33641 is considered a high-risk vulnerability due to its potential for remote code execution.

2

How do I fix CVE-2026-33641?

To fix CVE-2026-33641, upgrade Glances to version 4.5.3 or later where the vulnerability is addressed.

3

What type of vulnerability is CVE-2026-33641?

CVE-2026-33641 is a command injection vulnerability that allows execution of arbitrary system commands.

4

Who is affected by CVE-2026-33641?

CVE-2026-33641 affects all versions of Glances up to and including version 4.5.2.

5

What can an attacker do with CVE-2026-33641?

An attacker can exploit CVE-2026-33641 to execute arbitrary system commands on a vulnerable Glances installation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203