CVE-2021-23418: Glances XML External Entity Reference Vulnerability
MODERATECVE-2021-23418 is a MODERATE (CVSS 6.3) xml external entity reference vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Glances libraries in the PyPI ecosystem. The issue involves xml external entity reference in glances. Remediation is available by upgrading affected packages to version 3.2.1.
CVE-2021-23418 at a Glance
Security Impact
CVSS: 6.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:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2021-23418
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>=3.2.1
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-2021-23418, 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 3.2.1), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. 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-2021-23418 Affected Glances Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Glances
|
PyPI |
< 3.2.1
|
3.2.1
|
References
Frequently Asked Questions
What is CVE-2021-23418?
Which Glances versions are affected?
What version fixes CVE-2021-23418?
Is Glances affected?
What is the CVSS score of CVE-2021-23418?
What CWE is associated with CVE-2021-23418?
How can I check PyPI dependencies for CVE-2021-23418?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r2mj-8wgq-73m6",
"modified" : "2024-09-20T20:59:24Z",
"published" : "2021-08-09T20:43:14Z",
"aliases" : [ "CVE-2021-23418" ],
"summary" : "XML External Entity Reference in Glances",
"details" : "The package glances before 3.2.1 are vulnerable to XML External Entity (XXE) Injection via the use of Fault to parse untrusted XML data, which is known to be vulnerable to XML attacks.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Glances"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23418"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/issues/1025"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/commit/4b87e979afdc06d98ed1b48da31e69eaa3a9fb94"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/commit/85d5a6b4af31fcf785d5a61086cbbd166b40b07a"
}, {
"type" : "WEB",
"url" : "https://github.com/nicolargo/glances/commit/9d6051be4a42f692392049fdbfc85d5dfa458b32"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-r2mj-8wgq-73m6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nicolargo/glances"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/glances/PYSEC-2021-115.yaml"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-PYTHON-GLANCES-1311807"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-02T18:18:37Z",
"nvd_published_at" : "2021-07-29T18:15:00Z"
}
}