CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-3vwc-qwhc-3mj7: Glances has arbitrary file write and command execution via `secure_popen` redirection and chaining operators in AMP command configuration

highCVSS 7.8CVE-2026-53925
Summary The secure_popen() function in glances/secure.py interprets > (file redirection), | (pipe), and && (command chaining) operators in command strings. These operators are applied without any validation on the target file path, piped command, or chained command. When Application Monitoring Process (AMP) modules load their command or service_cmd configuration values from glances.conf, those values are passed directly to secure_popen() with no sanitization. This allows an attacker who can modify the Glances configuration file to write arbitrary content to arbitrary filesystem paths (via >), chain arbitrary commands (via &&), or pipe command output to arbitrary programs (via |). Crucially, this vulnerability is not mitigated by the --disable-config-exec flag that was introduced to address CVE-2026-33641. That flag only disables backtick command execution in config.get_value(); it does not affect the secure_popen() function's interpretation of shell-like operators. Details Affected code path 1 — Default AMP (glances/amps/default/init.py:69) res = self.get('command') ... self.set_result(secure_popen(res).rstrip()) The command config value is loaded from [amp_<name>] sections via GlancesAmp.load_config() (glances/amps/amp.py:81): self.configs[param] = config.get_value(amp_section, param).split(',') Affected code path 2 — SystemV AMP (glances/amps/systemv/init.py:60) res = secure_popen(self.get('service_cmd')) The service_cmd config value is loaded from [amp_systemv] sections via the same GlancesAmp.load_config() method. **Sink — secure_popen() (glances/secure.py:33-77)** The function explicitly parses: - > for file redirection (line 39): cmd.split('>') — the path after > is used directly in open(stdout_redirect, "w") (line 71) with no path validation. - | for command piping (line 51): cmd.split('|') — each segment is executed as a separate Popen with stdout piped to the next. - && for command chaining (line 27 in secure_popen): cmd.split('&&') — e

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
high — CVSS 7.8
Published
2026-06-23
Last updated
2026-07-21
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-3vwc-qwhc-3mj7

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-53925coverage & exploitation statusNVD · CVE.org

More from GitHub Security Advisories