GHSA-3vwc-qwhc-3mj7: Glances has arbitrary file write and command execution via `secure_popen` redirection and chaining operators in AMP command configuration
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
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.
- Low exploitation riskCVE-2026-539250.14% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 4% of all scored CVEs.
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-53925 | coverage & exploitation status | NVD · CVE.org |
More from GitHub Security Advisories
- mediumGHSA-xm43-3m56-w3wf: Ghost: Paid gift memberships obtainable at minimal cost via the donations feature2026-08-04
- mediumGHSA-chgm-3698-jm42: Ghost: Member existence leak via magic link sign-in response2026-08-04
- highGHSA-xpp7-93x6-v29m: XSS in Ghost's ActivityPub client2026-08-04
- mediumGHSA-7mpp-r37j-x5wh: Ghost: Session Fixation in Ghost Admin2026-08-04
- mediumGHSA-cjc9-q5gf-327p: Ghost: Theme Upload Path Traversal2026-08-04