CVE-2026-32609: Glances /api/v4/args Endpoint Leaks Password Hash Vulnerability

HIGH
Advisory Identifier: GHSA-cvwp-r2g2-j824
CVSS 7.5
CWE-200
Published
Advisory Summary

CVE-2026-32609 is a HIGH (CVSS 7.5) /api/v4/args endpoint leaks password hash vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Glances libraries in the PyPI ecosystem. The issue involves /api/v4/args endpoint leaks password hash and snmp credentials. Remediation is available by upgrading affected packages to version 4.5.2.

CVE-2026-32609 at a Glance

CVE Identifier CVE-2026-32609
GHSA Identifier GHSA-cvwp-r2g2-j824
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Glances
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-32609

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.2
pip install Glances>=4.5.2
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-32609, 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.2), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. 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 The GHSA-gh4x fix (commit 5d3de60) addressed unauthenticated configuration secrets exposure on the `/api/v4/config` endpoints by introducing `as_dict_secure()` redaction. However, the `/api/v4/args` and `/api/v4/args/{item}` endpoints were not addressed by this fix. These endpoints return the complete command-line arguments namespace via `vars(self.args)`, which includes the password hash (salt + pbkdf2_hmac), SNMP community strings, SNMP authentication keys, and the configuration file path. When Glances runs without `--password` (the default), these endpoints are accessible without any authentication. ## Details The secrets exposure fix (GHSA-gh4x, commit 5d3de60) modified three config-related endpoints to use `as_dict_secure()` when no password is configured: ```python # glances/outputs/glances_restful_api.py:1168 (FIXED) args_json = self.config.as_dict() if self.args.password else self.config.as_dict_secure() ``` However, the `_api_args` and `_api_args_item` endpoints were not part of this fix and still return all arguments without any sanitization: ```python # glances/outputs/glances_restful_api.py:1222-1237 def _api_args(self): try: # Get the RAW value of the args dict # Use vars to convert namespace to dict args_json = vars(self.args) except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get args ({str(e)})") return GlancesJSONResponse(args_json) ``` And the item-specific endpoint: ```python # glances/outputs/glances_restful_api.py:1239-1258 def _api_args_item(self, item: str): ... args_json = vars(self.args)[item] return GlancesJSONResponse(args_json) ``` The `self.args` namespace contains sensitive fields set during initialization in `glances/main.py`: 1. **`password`** (line 806-819): When `--password` is used, this contains the salt + pbkdf2_hmac hash. An attacker can use this for offline brute-force attacks. 2. **`snmp_community`** (line 445): Default `"public"`, but may be set to a secret community string for SNMP monitoring. 3. **`snmp_user`** (line 448): SNMP v3 username, default `"private"`. 4. **`snmp_auth`** (line 450): SNMP v3 authentication key, default `"password"` but typically set to a secret value. 5. **`conf_file`** (line 198): Path to the configuration file, reveals filesystem structure. 6. **`username`** (line 430/800): The Glances authentication username. Both endpoints are registered on the authenticated router (line 504-505): ```python f'{base_path}/args': self._api_args, f'{base_path}/args/{{item}}': self._api_args_item, ``` When `--password` is not set (the default), the router has NO authentication dependency (line 479-480), making these endpoints completely unauthenticated: ```python if self.args.password: router = APIRouter(prefix=self.url_prefix, dependencies=[Depends(self.authentication)]) else: router = APIRouter(prefix=self.url_prefix) ``` ## PoC **Scenario 1: No password configured (default deployment)** ```bash # Start Glances in web server mode (default, no password) glances -w # Access all command line arguments without authentication curl -s http://localhost:61208/api/4/args | python -m json.tool # Expected output includes sensitive fields: # "password": "", # "snmp_community": "public", # "snmp_user": "private", # "snmp_auth": "password", # "username": "glances", # "conf_file": "/home/user/.config/glances/glances.conf", # Access specific sensitive argument curl -s http://localhost:61208/api/4/args/snmp_community curl -s http://localhost:61208/api/4/args/snmp_auth ``` **Scenario 2: Password configured (authenticated deployment)** ```bash # Start Glances with password authentication glances -w --password --username admin # Authenticate and access args (password hash exposed to authenticated users) curl -s -u admin:mypassword http://localhost:61208/api/4/args/password # Returns the salt$pbkdf2_hmac hash which enables offline brute-force ``` ## Impact - **Unauthenticated network reconnaissance:** When Glances runs without `--password` (the common default for internal/trusted networks), anyone who can reach the web server can enumerate SNMP credentials, usernames, file paths, and all runtime configuration. - **Offline password cracking:** When authentication is enabled, an authenticated user can retrieve the password hash (salt + pbkdf2_hmac) and perform offline brute-force attacks. The hash uses pbkdf2_hmac with SHA-256 and 100,000 iterations (see `glances/password.py:45`), which provides some protection but is still crackable with modern hardware. - **Lateral movement:** Exposed SNMP community strings and v3 authentication keys can be used to access other network devices monitored by the Glances instance. - **Supply chain for CORS attack:** Combined with the default CORS misconfiguration (finding 001), these secrets can be stolen cross-origin by a malicious website. ## Recommended Fix Apply the same redaction pattern used for the `/api/v4/config` endpoints: ```python # glances/outputs/glances_restful_api.py _SENSITIVE_ARGS = frozenset({ 'password', 'snmp_community', 'snmp_user', 'snmp_auth', 'conf_file', 'password_prompt', 'username_used', }) def _api_args(self): try: args_json = vars(self.args).copy() if not self.args.password: for key in _SENSITIVE_ARGS: if key in args_json: args_json[key] = "********" # Never expose the password hash, even to authenticated users if 'password' in args_json and args_json['password']: args_json['password'] = "********" except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get args ({str(e)})") return GlancesJSONResponse(args_json) def _api_args_item(self, item: str): if item not in self.args: raise HTTPException(status.HTTP_400_BAD_REQUEST, f"Unknown argument item {item}") try: if item in _SENSITIVE_ARGS: if not self.args.password: return GlancesJSONResponse("********") if item == 'password': return GlancesJSONResponse("********") args_json = vars(self.args)[item] except Exception as e: raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get args item ({str(e)})") return GlancesJSONResponse(args_json) ```

CVE-2026-32609 Affected Glances Versions

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

References

Frequently Asked Questions

What is CVE-2026-32609?
CVE-2026-32609 is a security vulnerability in Glances involving /api/v4/args Endpoint Leaks Password Hash and SNMP Credentials under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Glances versions are affected?
Affected versions include releases prior to 4.5.2 across affected packages: Glances.
What version fixes CVE-2026-32609?
Upgrading to 4.5.2 (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.2. Upgrade your dependency to 4.5.2 or later.
What is the CVSS score of CVE-2026-32609?
CVE-2026-32609 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-32609?
CVE-2026-32609 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2026-32609?
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-cvwp-r2g2-j824",
  "modified" : "2026-03-19T21:06:22Z",
  "published" : "2026-03-16T16:26:54Z",
  "aliases" : [ "CVE-2026-32609" ],
  "summary" : "Glances has Incomplete Secrets Redaction: /api/v4/args Endpoint Leaks Password Hash and SNMP Credentials",
  "details" : "## Summary\n\nThe GHSA-gh4x fix (commit 5d3de60) addressed unauthenticated configuration secrets exposure on the `/api/v4/config` endpoints by introducing `as_dict_secure()` redaction. However, the `/api/v4/args` and `/api/v4/args/{item}` endpoints were not addressed by this fix. These endpoints return the complete command-line arguments namespace via `vars(self.args)`, which includes the password hash (salt + pbkdf2_hmac), SNMP community strings, SNMP authentication keys, and the configuration file path. When Glances runs without `--password` (the default), these endpoints are accessible without any authentication.\n\n## Details\n\nThe secrets exposure fix (GHSA-gh4x, commit 5d3de60) modified three config-related endpoints to use `as_dict_secure()` when no password is configured:\n\n```python\n# glances/outputs/glances_restful_api.py:1168 (FIXED)\nargs_json = self.config.as_dict() if self.args.password else self.config.as_dict_secure()\n```\n\nHowever, the `_api_args` and `_api_args_item` endpoints were not part of this fix and still return all arguments without any sanitization:\n\n```python\n# glances/outputs/glances_restful_api.py:1222-1237\ndef _api_args(self):\n    try:\n        # Get the RAW value of the args dict\n        # Use vars to convert namespace to dict\n        args_json = vars(self.args)\n    except Exception as e:\n        raise HTTPException(status.HTTP_404_NOT_FOUND, f\"Cannot get args ({str(e)})\")\n\n    return GlancesJSONResponse(args_json)\n```\n\nAnd the item-specific endpoint:\n\n```python\n# glances/outputs/glances_restful_api.py:1239-1258\ndef _api_args_item(self, item: str):\n    ...\n    args_json = vars(self.args)[item]\n    return GlancesJSONResponse(args_json)\n```\n\nThe `self.args` namespace contains sensitive fields set during initialization in `glances/main.py`:\n\n1. **`password`** (line 806-819): When `--password` is used, this contains the salt + pbkdf2_hmac hash. An attacker can use this for offline brute-force attacks.\n\n2. **`snmp_community`** (line 445): Default `\"public\"`, but may be set to a secret community string for SNMP monitoring.\n\n3. **`snmp_user`** (line 448): SNMP v3 username, default `\"private\"`.\n\n4. **`snmp_auth`** (line 450): SNMP v3 authentication key, default `\"password\"` but typically set to a secret value.\n\n5. **`conf_file`** (line 198): Path to the configuration file, reveals filesystem structure.\n\n6. **`username`** (line 430/800): The Glances authentication username.\n\nBoth endpoints are registered on the authenticated router (line 504-505):\n```python\nf'{base_path}/args': self._api_args,\nf'{base_path}/args/{{item}}': self._api_args_item,\n```\n\nWhen `--password` is not set (the default), the router has NO authentication dependency (line 479-480), making these endpoints completely unauthenticated:\n```python\nif self.args.password:\n    router = APIRouter(prefix=self.url_prefix, dependencies=[Depends(self.authentication)])\nelse:\n    router = APIRouter(prefix=self.url_prefix)\n```\n\n## PoC\n\n**Scenario 1: No password configured (default deployment)**\n\n```bash\n# Start Glances in web server mode (default, no password)\nglances -w\n\n# Access all command line arguments without authentication\ncurl -s http://localhost:61208/api/4/args | python -m json.tool\n\n# Expected output includes sensitive fields:\n# \"password\": \"\",\n# \"snmp_community\": \"public\",\n# \"snmp_user\": \"private\",\n# \"snmp_auth\": \"password\",\n# \"username\": \"glances\",\n# \"conf_file\": \"/home/user/.config/glances/glances.conf\",\n\n# Access specific sensitive argument\ncurl -s http://localhost:61208/api/4/args/snmp_community\ncurl -s http://localhost:61208/api/4/args/snmp_auth\n```\n\n**Scenario 2: Password configured (authenticated deployment)**\n\n```bash\n# Start Glances with password authentication\nglances -w --password --username admin\n\n# Authenticate and access args (password hash exposed to authenticated users)\ncurl -s -u admin:mypassword http://localhost:61208/api/4/args/password\n# Returns the salt$pbkdf2_hmac hash which enables offline brute-force\n```\n\n## Impact\n\n- **Unauthenticated network reconnaissance:** When Glances runs without `--password` (the common default for internal/trusted networks), anyone who can reach the web server can enumerate SNMP credentials, usernames, file paths, and all runtime configuration.\n\n- **Offline password cracking:** When authentication is enabled, an authenticated user can retrieve the password hash (salt + pbkdf2_hmac) and perform offline brute-force attacks. The hash uses pbkdf2_hmac with SHA-256 and 100,000 iterations (see `glances/password.py:45`), which provides some protection but is still crackable with modern hardware.\n\n- **Lateral movement:** Exposed SNMP community strings and v3 authentication keys can be used to access other network devices monitored by the Glances instance.\n\n- **Supply chain for CORS attack:** Combined with the default CORS misconfiguration (finding 001), these secrets can be stolen cross-origin by a malicious website.\n\n## Recommended Fix\n\nApply the same redaction pattern used for the `/api/v4/config` endpoints:\n\n```python\n# glances/outputs/glances_restful_api.py\n\n_SENSITIVE_ARGS = frozenset({\n    'password', 'snmp_community', 'snmp_user', 'snmp_auth',\n    'conf_file', 'password_prompt', 'username_used',\n})\n\ndef _api_args(self):\n    try:\n        args_json = vars(self.args).copy()\n        if not self.args.password:\n            for key in _SENSITIVE_ARGS:\n                if key in args_json:\n                    args_json[key] = \"********\"\n        # Never expose the password hash, even to authenticated users\n        if 'password' in args_json and args_json['password']:\n            args_json['password'] = \"********\"\n    except Exception as e:\n        raise HTTPException(status.HTTP_404_NOT_FOUND, f\"Cannot get args ({str(e)})\")\n    return GlancesJSONResponse(args_json)\n\ndef _api_args_item(self, item: str):\n    if item not in self.args:\n        raise HTTPException(status.HTTP_400_BAD_REQUEST, f\"Unknown argument item {item}\")\n    try:\n        if item in _SENSITIVE_ARGS:\n            if not self.args.password:\n                return GlancesJSONResponse(\"********\")\n            if item == 'password':\n                return GlancesJSONResponse(\"********\")\n        args_json = vars(self.args)[item]\n    except Exception as e:\n        raise HTTPException(status.HTTP_404_NOT_FOUND, f\"Cannot get args item ({str(e)})\")\n    return GlancesJSONResponse(args_json)\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Glances"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/security/advisories/GHSA-cvwp-r2g2-j824"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32609"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/commit/ff14eb9780ee10ec018c754754b1c8c7bfb6c44f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nicolargo/glances"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/releases/tag/v4.5.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-16T16:26:54Z",
    "nvd_published_at" : "2026-03-18T15:16:30Z"
  }
}