CVE-2026-62982
## Summary CVE-2026-32608 ("Command Injection via Process Names in Action Command Templates") was fixed (commit `5680a5d`) by adding `_sanitize_mustache_dict`, which replaces the shell operators `&&`, `|`, `>>`, `>` with spaces in the values rendered into action command templates. The sanitizer only processes **top-level string** values (`if isinstance(v, str)`). Attacker-controlled **nested** values — most notably a process's **`cmdline`, which Glances exposes as a `list`** and which is fully attacker-controlled via argv — are passed through **unsanitized**. Because the Mustache renderer (`chevron`) does **not** HTML-escape the pipe character `|`, a `|` embedded in such a nested value survives into the rendered command and is then interpreted by `secure_popen` (which still interprets `&&`/`|`/`>` by default, `allow_operators=True`), re-introducing the exact command injection the CVE was meant to close. ## Details The fix (`glances/actions.py`): ```python _SHELL_OPERATORS = ('&&', '|', '>>', '>') # line 25 def _sanitize_mustache_dict(mustache_dict): # line 28 ... for k, v in mustache_dict.items(): if isinstance(v, str): # line 40 <-- ONLY top-level strings for op in _SHELL_OPERATORS: v = v.replace(op, ' ') safe[k] = v else: safe[k] = v # nested list/dict passed VERBATIM return safe ``` Render + sink (`glances/actions.py:104-111`): ```python safe_dict = _sanitize_mustache_dict(mustache_dict) cmd_full = chevron.render(cmd, safe_dict) # chevron does NOT escape '|' ... ret = secure_popen(cmd_full) # secure_popen(cmd, allow_operators=True) ``` `secure_popen` (`glances/secure.py:17`, default `allow_operators=True`) splits the command by `&&`, then `__secure_popen` interprets `|` (pipe to a new process) and `>` (write output to a file
Properties
- ghsa_id
- GHSA-73wf-9vmv-5pv9
- severity
- high
- summary
- Glances: Incomplete fix of CVE-2026-32608: action-template sanitizer is bypassed by nested stat values (process 'cmdline') → OS command injection
- cvss_score
- 8.8
- cve_id
- CVE-2026-62982
- cvss_vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- is_ghsa_only
- false
- ghsa_published
- 2026-08-17T17:20:24Z
- source_url
- https://github.com/advisories/GHSA-73wf-9vmv-5pv9
- ghsa_updated
- 2026-08-17T17:20:25Z
Related Entities (4)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph