PT-2026-49096 · Glance · Glance
CVSS v3.1
7.8
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
glances (affected versions not specified)
Description
The
secure popen() function in glances/secure.py improperly interprets shell-like operators, specifically > (file redirection), | (pipe), and && (command chaining), within command strings. When Application Monitoring Process (AMP) modules load command or service cmd configuration values from glances.conf, these values are passed to secure popen() without sanitization. This allows an attacker who can modify the configuration file to write arbitrary content to any filesystem path, chain arbitrary commands, or pipe output to other programs.Technical details include:
- Vulnerable Function:
secure popen()parses the>operator to write to files viaopen(stdout redirect, "w")without path validation, and uses|and&&to execute sequential or piped processes. - Vulnerable Parameters: The
commandandservice cmdconfiguration values loaded from[amp <name>]and[amp systemv]sections.
The
--disable-config-exec flag does not mitigate this issue as it only prevents backtick execution in config.get value() and does not affect how secure popen() processes the resulting strings.Recommendations
At the moment, there is no information about a newer version that contains a fix for this vulnerability.
As a temporary workaround, restrict access to the
glances.conf file to prevent unauthorized modification of AMP command and service cmd values.
Avoid using the > , | , and && operators within the AMP configuration values.Exploit
LPE
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Glance