CVE-2021-21419: Eventlet Improper Handling Of Highly Compressed Vulnerability

MODERATE
Advisory Identifier: GHSA-9p9m-jm8w-94p2
CVSS 5.3
CWE-400
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-21419
GHSA Identifier GHSA-9p9m-jm8w-94p2
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Eventlet
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

eventlet fixed: 0.31.0
pip install eventlet>=0.31.0
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 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

### Impact A 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. ### Patches Version 0.31.0 restricts websocket frame to reasonable limits. ### Workarounds Restricting memory usage via OS limits would help against overall machine exhaustion. No workaround to protect Eventlet process. ### For more information If you have any questions or comments about this advisory: * Open an issue in [eventlet](https://github.com/eventlet/eventlet/issues) * Contact current maintainers. At 2021-03: temotor@gmail.com or https://t.me/temotor

CVE-2021-21419 Affected Eventlet Versions

1 component(s)
Fixed Versions:
0.31.0
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?
CVE-2021-21419 is a security vulnerability in Eventlet involving Improper Handling of Highly Compressed Data (Data Amplification) and Memory Allocation with Excessive Size Value in eventlet under CWE-400: Uncontrolled Resource Consumption.
Which Eventlet versions are affected?
Affected versions include releases prior to 0.31.0 across affected packages: eventlet.
What version fixes CVE-2021-21419?
Upgrading to 0.31.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is eventlet affected?
Yes, eventlet is affected in releases prior to 0.31.0. Upgrade your dependency to 0.31.0 or later.
What is the CVSS score of CVE-2021-21419?
CVE-2021-21419 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2021-21419?
CVE-2021-21419 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2021-21419?
Run the dependency tree command: 'pip show eventlet'. 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-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"
  }
}