GHSA-59fj-m2j6-hcxh: OS Command Injection

Published Aug 17, 2026
·
Updated

Summary In Glances 4.5.5 the --disable-config-exec flag was extended (GHSA-3vwc-qwhc-3mj7) to stop securepopen() from interpreting the shell operators &&, | and > in AMP command values taken from the configuration file. The hardening was not applied to the on-alert action command path, which reads its command lines from the same configuration file. As a result, with --disable-config-exec enabled, a configured alert action that contains > (file redirection), && (chaining) or | (pipe) still has those operators interpreted, allowing arbitrary file write / command chaining at the privilege of the glances process when the alert triggers.

Affected code glances/actions.py (Glances 4.5.5, latest): python ret = securepopen(cmdfull) # line 111 — no allowoperators=, defaults to True By contrast the AMP modules were fixed: python glances/amps/default/init.py:69 self.setresult(securepopen(res, allowoperators=self.allowoperators()).rstrip()) glances/amps/systemv/init.py:60 res = securepopen(self.get('servicecmd'), allowoperators=self.allowoperators())

PoC (benign) glances.conf: ini [cpu] usercritical=1 usercriticalaction=echo MARKER > /tmp/pocmarker Run glances --disable-config-exec and generate CPU load. When the cpu user alert reaches CRITICAL, /tmp/pocmarker is created — i.e. the > operator was interpreted despite --disable-config-exec. The same > in an [amp] command value is correctly not interpreted.

Impact Arbitrary file write (>), command chaining (&&) and pipe (|) from config-defined alert actions, contrary to the guarantee of --disable-config-exec. Trust boundary = the glances configuration file.

Suggested fix Pass allowoperators=not args.disableconfigexec from GlancesActions.run() into securepopen() (GlancesActions already holds args).

Credit Reported via responsible-disclosure incomplete-fix measurement study.

Affected Software

1 affected componentFixes available
pip/glances<=4.5.5
4.5.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/glances to a version that resolves this vulnerability.

    Fixed in 4.5.6
  2. Upgrade

    Upgrade Glances to a version that resolves this vulnerability.

    Fixed in 4.5.5Patch GHSA-3vwc-qwhc-3mj7
  3. Configuration

    Run Glances with the --disable-config-exec flag enabled so configured alert action commands are not executed with shell operators interpreted.

    Glances --disable-config-exec = enabled
  4. Compensating control

    Ensure the Glances configuration file (the trust boundary for AMP command values) is protected so untrusted users cannot modify on-alert action command strings.

Event History

Aug 17, 2026
Advisory Published
via GitHub·05:20 PM
Data Sourced
via GitHub·05:20 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-59fj-m2j6-hcxh?

The severity of GHSA-59fj-m2j6-hcxh is rated at 47.

2

What is the impact of GHSA-59fj-m2j6-hcxh?

GHSA-59fj-m2j6-hcxh involves OS Command Injection vulnerability due to improper handling of shell operators in on-alert actions.

3

How do I fix GHSA-59fj-m2j6-hcxh?

To fix GHSA-59fj-m2j6-hcxh, update to Glances version 4.5.6 or later where the vulnerability is addressed.

4

Who is affected by GHSA-59fj-m2j6-hcxh?

Any users of Glances version 4.5.5 who have configured on-alert action commands are affected by GHSA-59fj-m2j6-hcxh.

5

What versions of Glances are vulnerable to GHSA-59fj-m2j6-hcxh?

Glances versions prior to 4.5.6 are vulnerable to GHSA-59fj-m2j6-hcxh.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203