CVE-2026-68519: Glances `--disable-config-exec` Does Not Cover On-alert Vulnerability

HIGH
Advisory Identifier: GHSA-59fj-m2j6-hcxh
CWE-78
Published
Advisory Summary

CVE-2026-68519 is a HIGH `--disable-config-exec` does not cover on-alert vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Glances libraries in the PyPI ecosystem. The issue involves `--disable-config-exec` does not cover on-alert action commands (incomplete fix of cve-2026-53925). Remediation is available by upgrading affected packages to version 4.5.6.

CVE-2026-68519 at a Glance

CVE Identifier CVE-2026-68519
GHSA Identifier GHSA-59fj-m2j6-hcxh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Glances
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-68519

To remediate this vulnerability, upgrade all affected Glances dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

glances fixed: 4.5.6
pip install glances>=4.5.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show glances

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-68519, inspect your installed packages using pip:

pip show glances

Analyze the terminal output to locate any version of Glances in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.6), your application is affected.

Note: The pip show glances command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Glances, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary In Glances 4.5.5 the `--disable-config-exec` flag was extended (GHSA-3vwc-qwhc-3mj7) to stop `secure_popen()` 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 = secure_popen(cmd_full) # line 111 — no allow_operators=, defaults to True ``` By contrast the AMP modules were fixed: ```python # glances/amps/default/__init__.py:69 self.set_result(secure_popen(res, allow_operators=self.allow_operators()).rstrip()) # glances/amps/systemv/__init__.py:60 res = secure_popen(self.get('service_cmd'), allow_operators=self.allow_operators()) ``` ## PoC (benign) `glances.conf`: ```ini [cpu] user_critical=1 user_critical_action=echo MARKER > /tmp/poc_marker ``` Run `glances --disable-config-exec` and generate CPU load. When the cpu `user` alert reaches CRITICAL, `/tmp/poc_marker` 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 `allow_operators=not args.disable_config_exec` from `GlancesActions.run()` into `secure_popen()` (GlancesActions already holds `args`). ## Credit Reported via responsible-disclosure incomplete-fix measurement study.

CVE-2026-68519 Affected Glances Versions

1 component(s)
Fixed Versions:
4.5.6
Product / Package Ecosystem Affected Versions Fixed Version
glances
PyPI
< 4.5.6
4.5.6

References

Frequently Asked Questions

What is CVE-2026-68519?
CVE-2026-68519 is a security vulnerability in Glances involving `--disable-config-exec` does not cover on-alert action commands (incomplete fix of CVE-2026-53925) under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Glances versions are affected?
Affected versions include releases prior to 4.5.6 across affected packages: glances.
What version fixes CVE-2026-68519?
Upgrading to 4.5.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is glances affected?
Yes, glances is affected in releases prior to 4.5.6. Upgrade your dependency to 4.5.6 or later.
What CWE is associated with CVE-2026-68519?
CVE-2026-68519 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-68519?
Run the dependency tree command: 'pip show glances'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-59fj-m2j6-hcxh",
  "modified" : "2026-08-17T17:20:37Z",
  "published" : "2026-08-17T17:20:37Z",
  "aliases" : [ "CVE-2026-68519" ],
  "summary" : "Glances: `--disable-config-exec` does not cover on-alert action commands (incomplete fix of CVE-2026-53925)",
  "details" : "## Summary\nIn Glances 4.5.5 the `--disable-config-exec` flag was extended (GHSA-3vwc-qwhc-3mj7) to stop `secure_popen()` from\ninterpreting the shell operators `&&`, `|` and `>` in **AMP** command values taken from the configuration file. The\nhardening was not applied to the **on-alert action** command path, which reads its command lines from the same\nconfiguration file. As a result, with `--disable-config-exec` enabled, a configured alert action that contains `>`\n(file redirection), `&&` (chaining) or `|` (pipe) still has those operators interpreted, allowing arbitrary file\nwrite / command chaining at the privilege of the glances process when the alert triggers.\n\n## Affected code\n`glances/actions.py` (Glances 4.5.5, latest):\n```python\nret = secure_popen(cmd_full)        # line 111 — no allow_operators=, defaults to True\n```\nBy contrast the AMP modules were fixed:\n```python\n# glances/amps/default/__init__.py:69\nself.set_result(secure_popen(res, allow_operators=self.allow_operators()).rstrip())\n# glances/amps/systemv/__init__.py:60\nres = secure_popen(self.get('service_cmd'), allow_operators=self.allow_operators())\n```\n\n## PoC (benign)\n`glances.conf`:\n```ini\n[cpu]\nuser_critical=1\nuser_critical_action=echo MARKER > /tmp/poc_marker\n```\nRun `glances --disable-config-exec` and generate CPU load. When the cpu `user` alert reaches CRITICAL, `/tmp/poc_marker`\nis created — i.e. the `>` operator was interpreted despite `--disable-config-exec`. The same `>` in an `[amp_*]`\n`command` value is correctly *not* interpreted.\n\n## Impact\nArbitrary file write (`>`), command chaining (`&&`) and pipe (`|`) from config-defined alert actions, contrary to the\nguarantee of `--disable-config-exec`. Trust boundary = the glances configuration file.\n\n## Suggested fix\nPass `allow_operators=not args.disable_config_exec` from `GlancesActions.run()` into `secure_popen()` (GlancesActions\nalready holds `args`).\n\n## Credit\nReported via responsible-disclosure incomplete-fix measurement study.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "glances"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.5.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/security/advisories/GHSA-59fj-m2j6-hcxh"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/commit/5c07c0d96423e9d5b9de71dd92e3717c66f504bd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nicolargo/glances"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/releases/tag/v4.5.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-17T17:20:37Z",
    "nvd_published_at" : null
  }
}