Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Glances
  4. ›
  5. CVE-2026-68518

CVE-2026-68518: Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction

August 17, 2026

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.

References

  • github.com/advisories/GHSA-qcpp-8x79-hhp3
  • github.com/nicolargo/glances/commit/9c280eae5419da680827024b60f6265956e31994
  • github.com/nicolargo/glances/releases/tag/v4.5.6
  • github.com/nicolargo/glances/security/advisories/GHSA-qcpp-8x79-hhp3
  • nvd.nist.gov/vuln/detail/CVE-2026-68518

Code Behaviors & Features

Detect and mitigate CVE-2026-68518 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.6

Fixed versions

  • 4.5.6

Solution

Upgrade to version 4.5.6 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

pypi/Glances/CVE-2026-68518.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 05 Sep 2026 12:16:16 +0000.