Intel

AIKIDO-2026-392230

glances is vulnerable to OS Command Injection

OS Command InjectionCVE-2026-62982 Published 4 days ago

88

High Risk

This Affects:

PYTHONglances
4.5.2 - 4.5.5
Fixed in 4.5.6
Are you affected? Scan for Free

TL;DR

Glances renders monitoring stat fields into administrator-configured action command templates and executes the result through secure_popen(). The _sanitize_mustache_dict() sanitiser only strips shell operators from top-level string values and passes nested list or dict values through unchanged. A process cmdline, which is attacker-controlled through argv and exposed as a list, can carry a | that survives Mustache rendering and is interpreted as a pipe, re-enabling OS command injection in the Glances process context. The fix sanitises stat values recursively so operators inside nested values are also neutralised.

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 renders a nested stat field such as a process cmdline.

Background info

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

How to fix this

Upgrade the glances library to the patch version.