Intel

AIKIDO-2026-325249

glances is vulnerable to OS Command Injection

CVE-2026-68518Published Aug 3, 2026
August 3, 2026

69

CVE Score

Medium

OS Command Injection

Are you affected? Scan for Free

TL;DR

Glances sanitises attacker-influenced stat fields before rendering them into administrator-configured action command templates executed by secure_popen(). The _sanitize_mustache_dict() sanitiser strips shell operators from each value individually but not from the rendered command string. When a template concatenates two adjacent unescaped variables, a trailing single ampersand from one value and a leading one from the next reconstruct a real operator after rendering, re-enabling command chaining, piping and redirection. The fix neutralises lone operator characters so they cannot be recombined across adjacent template variables.

How do I fix this?

Upgrade the glances library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you have configured an action command template that concatenates two adjacent unescaped Mustache variables filled from untrusted, user-controlled stat fields such as a process name or command line.

Package

Versions

4.5.2 - 4.5.5

Fixed in 4.5.6

Background info

glances is vulnerable to OS Command Injection in versions 4.5.2 - 4.5.5.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea