CVE-2021-21419: Eventlet Improper Handling Of Highly Compressed Vulnerability
MODERATECVE-2021-21419 is a MODERATE (CVSS 5.3) improper handling of highly compressed vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Eventlet libraries in the PyPI ecosystem. The issue involves improper handling of highly compressed data (data amplification) and memory allocation with excessive size value in eventlet. Remediation is available by upgrading affected packages to version 0.31.0.
CVE-2021-21419 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:N/I:N/A:L).
How to Fix CVE-2021-21419
To remediate this vulnerability, upgrade all affected Eventlet 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 eventlet>=0.31.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show eventlet
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-21419, inspect your installed packages using pip:
pip show eventlet
Analyze the terminal output to locate any version of Eventlet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.31.0), your application is affected.
Note: The pip show eventlet command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Eventlet, 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-21419 Affected Eventlet Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
eventlet
|
PyPI |
≥ 0.10
< 0.31.0
|
0.31.0
|
References
Frequently Asked Questions
What is CVE-2021-21419?
Which Eventlet versions are affected?
What version fixes CVE-2021-21419?
Is eventlet affected?
What is the CVSS score of CVE-2021-21419?
What CWE is associated with CVE-2021-21419?
How can I check PyPI dependencies for CVE-2021-21419?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9p9m-jm8w-94p2",
"modified" : "2024-09-20T17:20:53Z",
"published" : "2021-05-07T15:50:36Z",
"aliases" : [ "CVE-2021-21419" ],
"summary" : "Improper Handling of Highly Compressed Data (Data Amplification) and Memory Allocation with Excessive Size Value in eventlet",
"details" : "### Impact\nA websocket peer may exhaust memory on Eventlet side by sending very large websocket frames. Malicious peer may exhaust memory on Eventlet side by sending highly compressed data frame.\n\n### Patches\nVersion 0.31.0 restricts websocket frame to reasonable limits.\n\n### Workarounds\nRestricting memory usage via OS limits would help against overall machine exhaustion. No workaround to protect Eventlet process.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [eventlet](https://github.com/eventlet/eventlet/issues)\n* Contact current maintainers. At 2021-03: temotor@gmail.com or https://t.me/temotor",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "eventlet"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.10"
}, {
"fixed" : "0.31.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/eventlet/eventlet/security/advisories/GHSA-9p9m-jm8w-94p2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21419"
}, {
"type" : "WEB",
"url" : "https://github.com/eventlet/eventlet/commit/1412f5e4125b4313f815778a1acb4d3336efcd07"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/eventlet/eventlet"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/eventlet/PYSEC-2021-12.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2WJFSBPLCNSZNHYQC4QDRDFRTEZRMD2L"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R5JZP4LZOSP7CUAM3GIRW6PIAWKH5VGB"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-07T14:31:05Z",
"nvd_published_at" : "2021-05-07T15:15:00Z"
}
}