CVE-2026-68518
### Summary The Glances action system lets an administrator configure shell commands that run when a monitoring threshold is crossed. The command is a Mustache template whose variables are filled with runtime stat fields such as a process name, a container name or a filesystem mount point. Those fields are attacker-influenceable: a local, unprivileged user who starts a process (or a container) controls its name and command line. The rendered command is executed by `secure_popen()`, which interprets `&&`, `|` and `>` as chaining / pipe / redirection operators. `glances/actions.py` defends against this with `_sanitize_mustache_dict()`, which strips those operators from **each individual** template value before rendering. The sanitization is applied per field, but the operators are reconstructed **across the boundary of two adjacent template variables** after Mustache rendering. When an action template concatenates two unescaped variables (`{{{a}}}{{{b}}}` or `{{&a}}{{&b}}`) and the attacker makes the first value end with `&` and the second begin with `&`, the rendered command contains a real `&&`, and `secure_popen()` executes the injected command. The single-`&` in each value passes the per-field filter untouched. ### Affected versions `glances` `<= 4.5.5` (verified against the published PyPI release `4.5.5`, the latest at the time of writing; `glances.__version__ == "4.5.5"`). The per-field sanitizer `_sanitize_mustache_dict()` is present and active in this release. Not patched in any released version. ### Privilege required Two roles are involved: - A local, unprivileged user (or a container the attacker can name) supplies the attacker-controlled stat values (process/container name, mount point, etc.). This is the same trust boundary the action-template command-injection class already recognises: the attacker controls the process name, not the configuration. - An administrator has configured an action whose command template concatenates two **unesc
Properties
- ghsa_id
- GHSA-qcpp-8x79-hhp3
- severity
- high
- summary
- Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
- cve_id
- CVE-2026-68518
- is_ghsa_only
- false
- ghsa_published
- 2026-08-17T16:36:37Z
- source_url
- https://github.com/advisories/GHSA-qcpp-8x79-hhp3
- ghsa_updated
- 2026-08-17T16:36:37Z
Related Entities (4)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph