Glances

CVE-2026-32608

CVE-2026-32608 is a high-severity OS command injection vulnerability in Glances (pip), affecting versions < 4.5.2. It is fixed in 4.5.2.

Key facts
CVSS score
7.0
High
Attack vector
Local
Issuing authority
GitHub Advisory Database
Affected package
Glances
Fixed in
4.5.2
Disclosed
2026

Summary

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 securepopen() 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): When the threshold is exceeded, the plugin model renders the template with runtime stats (glances/plugins/plugin/model.py:943): The mustachedict contains the full stat dictionary, including user-controllable fields like process name, filesystem mntpoint, container name, etc. (glances/plugins/plugin/model.py:920-943). In glances/actions.py:77-78, the Mustache library renders the template: The rendered command is passed to securepopen() (glances/actions.py:84): The securepopen vulnerability (glances/secure.py:17-30): And securepopen() (glances/secure.py:33-77) splits by > and | then calls Popen(subcmdsplit, 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: PoC Scenario 1: Command injection via pipe in process name Scenario 2: Command chain via && in container name 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 securepopen enables writing arbitrary content to arbitrary file paths. Preconditions: Requires admin-configured action templates referencing user-controllable fields + attacker ability to run processes on monitored system. Recommended Fix Sanitize Mustache-rendered values before securepopen processes them:

Impact

What is OS command injection?

Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.

Severity and exposure

CVE-2026-32608 has a CVSS score of 7.0 (High). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (4.5.2). Upgrading removes the vulnerable code path.

Affected versions

pip

  • Glances (< 4.5.2)

Security releases

  • Glances → 4.5.2 (pip)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's Application Detection and Response identifies whether CVE-2026-32608 is reachable in your applications. Explore runtime application protection for your team.

See if CVE-2026-32608 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-32608 in your environment

Remediation advice

Upgrade Glances to 4.5.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-32608

What is CVE-2026-32608?

CVE-2026-32608 is a high-severity OS command injection vulnerability in Glances (pip), affecting versions < 4.5.2. It is fixed in 4.5.2. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.

How severe is CVE-2026-32608?

CVE-2026-32608 has a CVSS score of 7.0 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of Glances are affected by CVE-2026-32608?

Glances (pip) versions < 4.5.2 is affected.

Is there a fix for CVE-2026-32608?

Yes. CVE-2026-32608 is fixed in 4.5.2. Upgrade to this version or later.

Is CVE-2026-32608 exploitable, and should I be worried?

Whether CVE-2026-32608 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-32608 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-32608?

Upgrade Glances to 4.5.2 or later.

Stop the waste.
Protect your environment with Kodem.