CVE-2026-68518
Glances: Command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
CVE-2026-68518 is a high vulnerability (CVSS 8.8) in Nicolargo Glances, published August 17, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.17%, the 6th percentile. Fixed in glances 4.5.6.
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- 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
8.8
Glances: Command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
CVE-2026-68518- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2026-60265
8.8
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
EUVD-2026-60265- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-qcpp-8x79-hhp3
8.8
Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
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 unescaped Mustache variables with no separating character
(
{{{name}}}{{{cmdline}}}). Unescaped Mustache ({{{ }}}/{{& }}) is a documented Chevron feature and is the natural choice when the operator wants a value that contains shell-significant characters to reach the command verbatim.
No network access to the target host is required beyond the ability to run a process (or start a named container) on it.
Vulnerable code (file:line)
glances/actions.py:25-46 — the per-field sanitizer:
# glances/actions.py:25
_SHELL_OPERATORS = ('&&', '|', '>>', '>')
def _sanitize_mustache_dict(mustache_dict):
"""Return a copy of mustache_dict with shell operators replaced by spaces."""
if not mustache_dict:
return mustache_dict
safe = {}
for k, v in mustache_dict.items():
if isinstance(v, str):
for op in _SHELL_OPERATORS:
v = v.replace(op, ' ') # per-field only
safe[k] = v
else:
safe[k] = v
return safe
glances/actions.py:100-111 — sanitize-then-render-then-execute:
# glances/actions.py:100
for cmd in commands:
if chevron_tag:
safe_dict = _sanitize_mustache_dict(mustache_dict)
cmd_full = chevron.render(cmd, safe_dict) # concatenation happens here
else:
cmd_full = cmd
ret = secure_popen(cmd_full) # operators interpreted
Root cause
_sanitize_mustache_dict() removes &&, |, >>, > from each value in
isolation. It does not remove a lone &, because a single & is not one of the
listed operators. When two values are rendered next to each other by
chevron.render(), a trailing & from the first value and a leading & from the
second value join into a literal && in cmd_full. secure_popen() then
cmd.split('&&') and runs the second half as a separate subprocess.Popen
(shell=False) process. The same reconstruction works for > written as two…
- Record
GHSA-qcpp-8x79-hhp3- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
8.8
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
CVE-2026-68518- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
8.8
Glances: Command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
CVE-2026-68518- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-68518
8.8
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
DEBIAN-CVE-2026-68518- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-qcpp-8x79-hhp3
8.8
Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
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 unescaped Mustache variables with no separating character
(
{{{name}}}{{{cmdline}}}). Unescaped Mustache ({{{ }}}/{{& }}) is a documented Chevron feature and is the natural choice when the operator wants a value that contains shell-significant characters to reach the command verbatim.
No network access to the target host is required beyond the ability to run a process (or start a named container) on it.
Vulnerable code (file:line)
glances/actions.py:25-46 — the per-field sanitizer:
# glances/actions.py:25
_SHELL_OPERATORS = ('&&', '|', '>>', '>')
def _sanitize_mustache_dict(mustache_dict):
"""Return a copy of mustache_dict with shell operators replaced by spaces."""
if not mustache_dict:
return mustache_dict
safe = {}
for k, v in mustache_dict.items():
if isinstance(v, str):
for op in _SHELL_OPERATORS:
v = v.replace(op, ' ') # per-field only
safe[k] = v
else:
safe[k] = v
return safe
glances/actions.py:100-111 — sanitize-then-render-then-execute:
# glances/actions.py:100
for cmd in commands:
if chevron_tag:
safe_dict = _sanitize_mustache_dict(mustache_dict)
cmd_full = chevron.render(cmd, safe_dict) # concatenation happens here
else:
cmd_full = cmd
ret = secure_popen(cmd_full) # operators interpreted
Root cause
_sanitize_mustache_dict() removes &&, |, >>, > from each value in
isolation. It does not remove a lone &, because a single & is not one of the
listed operators. When two values are rendered next to each other by
chevron.render(), a trailing & from the first value and a leading & from the
second value join into a literal && in cmd_full. secure_popen() then
cmd.split('&&') and runs the second half as a separate subprocess.Popen
(shell=False) process. The same reconstruction works for > written as two…
- Record
GHSA-qcpp-8x79-hhp3- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVPYSEC-2026-3668
8.8
Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction
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 unescaped Mustache variables with no separating character
(
{{{name}}}{{{cmdline}}}). Unescaped Mustache ({{{ }}}/{{& }}) is a documented Chevron feature and is the natural choice when the operator wants a value that contains shell-significant characters to reach the command verbatim.
No network access to the target host is required beyond the ability to run a process (or start a named container) on it.
Vulnerable code (file:line)
glances/actions.py:25-46 — the per-field sanitizer:
# glances/actions.py:25
_SHELL_OPERATORS = ('&&', '|', '>>', '>')
def _sanitize_mustache_dict(mustache_dict):
"""Return a copy of mustache_dict with shell operators replaced by spaces."""
if not mustache_dict:
return mustache_dict
safe = {}
for k, v in mustache_dict.items():
if isinstance(v, str):
for op in _SHELL_OPERATORS:
v = v.replace(op, ' ') # per-field only
safe[k] = v
else:
safe[k] = v
return safe
glances/actions.py:100-111 — sanitize-then-render-then-execute:
# glances/actions.py:100
for cmd in commands:
if chevron_tag:
safe_dict = _sanitize_mustache_dict(mustache_dict)
cmd_full = chevron.render(cmd, safe_dict) # concatenation happens here
else:
cmd_full = cmd
ret = secure_popen(cmd_full) # operators interpreted
Root cause
_sanitize_mustache_dict() removes &&, |, >>, > from each value in
isolation. It does not remove a lone &, because a single & is not one of the
listed operators. When two values are rendered next to each other by
chevron.render(), a trailing & from the first value and a leading & from the
second value join into a literal && in cmd_full. secure_popen() then
cmd.split('&&') and runs the second half as a separate subprocess.Popen
(shell=False) process. The same reconstruction works for > written as two…
- Record
PYSEC-2026-3668- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-68518
8.8
Glances is an open-source system cross-platform monitoring tool. Prior to 4.5.6, _sanitize_mustache_dict() in glances/actions.py sanitizes individual Mustache values before chevron.render(), allowing adjacent unescaped Mustache variables to reconstruct shell operators that secure_popen() executes when attacker-controlled process or container fields are rendered by an administrator-configured action template. This issue is fixed in 4.5.6.
- Record
UBUNTU-CVE-2026-68518- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11674-1 No score
glances-common-4.5.6-1.1 on GA media
These are all security issues fixed in the glances-common-4.5.6-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11674-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
glancesPyPI |
through 4.5.5 | 4.5.6 |
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 10 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-14.5.7+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-1 Show 4 moreShow less4.5.4+dfsg-14.5.5+dfsg-14.5.6+dfsg-14.5.7+dfsg-1 |
None known |
glancesDebian:14 |
before 4.5.6+dfsg-1, 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-1 |
4.5.6+dfsg-1 |
glancesPyPI |
before 4.5.6, 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.6 |
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 |
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.6-1.1 | 4.5.6-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-qcpp-8x79-hhp3
github.com/nicolargo/glances/commit/9c280eae5419da680827024b60f6265956e31994
github.com/nicolargo/glances/releases/tag/v4.5.6
github.com/advisories/GHSA-qcpp-8x79-hhp3
github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68518.json
nvd.nist.gov/vuln/detail/CVE-2026-68518
Show 11 moreShow less
security-tracker.debian.org/tracker/CVE-2026-68518
github.com/nicolargo/glances
pypi.org/project/glances
ubuntu.com/security/CVE-2026-68518
cve.org/CVERecord?id=CVE-2026-68518
suse.com/security/cve/CVE-2021-23418
suse.com/security/cve/CVE-2026-62982
suse.com/security/cve/CVE-2026-68517
suse.com/security/cve/CVE-2026-68518
suse.com/security/cve/CVE-2026-68519
suse.com/security/cve/CVE-2026-68520
Left out here: 85 versions and the rest of 3 source descriptions. The JSON record has them.