Vulnerabilities in pkg:pypi/glances
PACKAGECVE-2026-68520 is a MODERATE (CVSS 5.3) as_dict_secure() value-level bypass leaks credentials vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Glances libraries in the PyPI ecosystem. The issue involves as_dict_secure() value-level bypass leaks credentials in url values via /api/4/config. Remediation is available by upgrading affected packages to version 4.5.6.
pkg:pypi/glances
Vulnerability advisories affecting package pkg:pypi/glances. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4h34-v6r8-mmjc | CVE-2026-68520 | MODERATE | Glances: as_dict_secure() Value-Level Bypass Leaks Credentials in URL Values via /api/4/config |
| GHSA-59fj-m2j6-hcxh | CVE-2026-68519 | HIGH | Glances: `--disable-config-exec` does not cover on-alert action commands (incomplete fix of CVE-2026-53925) |
| GHSA-73wf-9vmv-5pv9 | CVE-2026-62982 | HIGH | Glances: Incomplete fix of CVE-2026-32608: action-template sanitizer is bypassed by nested stat values (process 'cmdline') → OS command injection |
| GHSA-fp27-88fp-2phg | CVE-2026-68517 | MODERATE | Glances: REST API CORS Credentials Guard Uses Exact-Match Instead of Membership Test — Bypassed by Any Multi-Origin Allowlist Containing the Wildcard |
| GHSA-qcpp-8x79-hhp3 | CVE-2026-68518 | HIGH | Glances has a command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction |
| GHSA-3vwc-qwhc-3mj7 | CVE-2026-53925 | HIGH | Glances has arbitrary file write and command execution via `secure_popen` redirection and chaining operators in AMP command configuration |
| GHSA-w856-8p3r-p338 | CVE-2026-46611 | MODERATE | Glances: XML-RPC Server Missing Host Header Validation Enables DNS Rebinding Attack |
| GHSA-87qc-fj39-wccr | CVE-2026-46608 | HIGH | Glances: XML-RPC Multi-Origin CORS Configuration Silently Falls Back to Wildcard (Incomplete Fix for CVE-2026-33533) |
| GHSA-9837-48hr-q32j | CVE-2026-46607 | HIGH | Glances has Insecure Pickle Deserialization in its Version Cache that Leads to Arbitrary Code Execution |
| GHSA-v5r2-qh84-fjx5 | CVE-2026-46606 | HIGH | Glances is Vulnerable to Command Injection via KVM/QEMU VM Domain Names in glances/plugins/vms/engines/virsh.py |
| GHSA-g5pq-48mj-jvw8 | CVE-2026-35587 | HIGH | Glances has SSRF in IP Plugin via public_api leading to credential leakage |
| GHSA-grp3-h8m8-45p7 | CVE-2026-35588 | MODERATE | Glances has CQL Injection in its Cassandra Export Module via Unsanitized Config Values |
CVE-2026-68520 at a Glance
Security Impact
CVSS: 5.3
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:L/I:N/A:N).
How to Fix CVE-2026-68520
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.
pip install glances>=4.5.6
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-68520, 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-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
CVE-2026-68520 Affected Glances Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
glances
|
PyPI |
< 4.5.6
|
4.5.6
|
References
Frequently Asked Questions
What is CVE-2026-68520?
Which Glances versions are affected?
What version fixes CVE-2026-68520?
Is glances affected?
What is the CVSS score of CVE-2026-68520?
What CWE is associated with CVE-2026-68520?
How can I check PyPI dependencies for CVE-2026-68520?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4h34-v6r8-mmjc",
"modified" : "2026-08-17T17:20:48Z",
"published" : "2026-08-17T17:20:48Z",
"aliases" : [ "CVE-2026-68520" ],
"summary" : "Glances: as_dict_secure() Value-Level Bypass Leaks Credentials in URL Values via /api/4/config",
"details" : "## Summary\n\nGlances provides `as_dict_secure()` explicitly designed for unauthenticated API access, with a docstring stating it returns \"a sanitised copy of the configuration dict\" where \"Sensitive keys in remaining sections are replaced by '********'\". However, the implementation only checks KEY names against a regex pattern and never inspects VALUE content. The documented `[ip]` config section supports `public_api` (URL), `public_username` (login), and `public_password` (password). While `public_password` is correctly masked, both `public_api` (when containing embedded credentials like `https://user:pass@host/`) and `public_username` are returned in full to unauthenticated users via `GET /api/4/config`.\n\n## Affected Versions\n\nGlances latest (Docker: `nicolargo/glances:latest`)\n\n## Root Cause\n\nIn `glances/config.py`, `as_dict_secure()`:\n```python\n_SECURE_SENSITIVE_KEY_RE = re.compile(r\"password|token|secret|api_key|apikey|ssl_keyfile\", re.IGNORECASE)\n\ndef as_dict_secure(self):\n \"\"\"Return a sanitised copy of the configuration dict.\n Intended for unauthenticated API access.\n - Sensitive keys in remaining sections are replaced by '********'.\n \"\"\"\n sanitized = {}\n for section, options in self.as_dict().items():\n if section in _SECURE_BLOCKED_SECTIONS: continue\n sanitized[section] = {\n key: \"********\" if _SECURE_SENSITIVE_KEY_RE.search(key) else value\n for key, value in options.items()\n }\n return sanitized\n```\n\nIn `glances/outputs/glances_restful_api.py`:\n```python\n# Line 1294\nargs_json = self.config.as_dict() if self.args.password else self.config.as_dict_secure()\n```\n\nThe `[ip]` config section documents: `public_api` (URL), `public_username` (login), `public_password` (password).\n- `public_password` → matches \"password\" → masked ✓\n- `public_api` → no match → returned in full (contains `user:pass@` in URL) ✗\n- `public_username` → no match → returned in full ✗\n\n## Impact\n\n- Unauthenticated credential disclosure via `GET /api/4/config` or `GET /api/4/config/ip`\n- `as_dict_secure()` exists specifically to protect credentials in no-auth mode but fails to mask `public_username` and credential-bearing URLs in `public_api`\n\n## Prerequisites\n\n- Glances in web server mode without `--password` (default, no auth)\n- `glances.conf` `[ip]` section with `public_api` containing embedded credentials and/or `public_username` set\n\n## Environment\n\n- Glances latest (Docker: `nicolargo/glances:latest`)\n- Remote Docker lab at `http://10.140.200.102:8080`\n\n## Reproduction Steps\n\n```bash\ndocker run -d --name glances-test -p 8080:61208 -e GLANCES_OPT='-w' nicolargo/glances:latest\nsleep 20\ndocker exec glances-test sed -i 's|public_api=https://ipv4.ipleak.net/json/|public_api=https://admin:secret123@ipv4.ipleak.net/json/|' /etc/glances/glances.conf\ndocker exec glances-test sed -i 's|#public_username=<myname>|public_username=myname|' /etc/glances/glances.conf\ndocker exec glances-test sed -i 's|#public_password=<mysecret>|public_password=mysecret|' /etc/glances/glances.conf\ndocker restart glances-test\nsleep 15\ncurl -s \"$TARGET/api/4/config/ip\"\n# Returns: {\"public_api\": \"https://admin:secret123@...\", \"public_username\": \"myname\", \"public_password\": \"********\"}\n```\n\n## Evidence\n\nSee `C:/Tools/glances-config-leak-evidence.txt`.\n\n## Dedup Check\n\n- GHSA-gfc2-9qmw-w7vh covers CORS but NOT value-level credential leak\n- No existing GHSA covers `as_dict_secure()` value-level filtering gap\n- 13 published GHSA, none covering this issue\n\n## Suggested Remediation\n\nAdd \"username\" and \"login\" to sensitive key pattern, and check values for embedded credentials in URLs.\n\n## Disclosure Timeline\n\n- 2026-07-28: Vulnerability discovered and verified via Docker deployment\n\n## Reporter\n\nGitHub username: Todor",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "glances"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/security/advisories/GHSA-4h34-v6r8-mmjc"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/commit/8d0f8276c2abd2e9d400bd6c84bdfba0dfcab065"
}, {
"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-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-17T17:20:48Z",
"nvd_published_at" : null
}
}