CVE-2024-5569: Zipp Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-jfmj-5v4g-7637
CVSS 6.2
CWE-400 CWE-835
Published
Advisory Summary

CVE-2024-5569 is a MODERATE (CVSS 6.2) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Zipp libraries in the PyPI ecosystem. The issue involves zipp denial of service vulnerability. Remediation is available by upgrading affected packages to version 3.19.1.

CVE-2024-5569 at a Glance

CVE Identifier CVE-2024-5569
GHSA Identifier GHSA-jfmj-5v4g-7637
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Zipp
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Local (AV:L)
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 High (A:H)

How to Fix CVE-2024-5569

To remediate this vulnerability, upgrade all affected Zipp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zipp fixed: 3.19.1
pip install zipp>=3.19.1
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 zipp

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-5569, inspect your installed packages using pip:

pip show zipp

Analyze the terminal output to locate any version of Zipp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.19.1), your application is affected.

Note: The pip show zipp 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 Zipp, 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

A Denial of Service (DoS) vulnerability exists in the jaraco/zipp library, affecting all versions prior to 3.19.1. The vulnerability is triggered when processing a specially crafted zip file that leads to an infinite loop. This issue also impacts the zipfile module of CPython, as features from the third-party zipp library are later merged into CPython, and the affected code is identical in both projects. The infinite loop can be initiated through the use of functions affecting the `Path` module in both zipp and zipfile, such as `joinpath`, the overloaded division operator, and `iterdir`. Although the infinite loop is not resource exhaustive, it prevents the application from responding. The vulnerability was addressed in version 3.19.1 of jaraco/zipp.

CVE-2024-5569 Affected Zipp Versions

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

References

Frequently Asked Questions

What is CVE-2024-5569?
CVE-2024-5569 is a security vulnerability in Zipp involving zipp Denial of Service vulnerability under CWE-400: Uncontrolled Resource Consumption.
Which Zipp versions are affected?
Affected versions include releases prior to 3.19.1 across affected packages: zipp.
What version fixes CVE-2024-5569?
Upgrading to 3.19.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zipp affected?
Yes, zipp is affected in releases prior to 3.19.1. Upgrade your dependency to 3.19.1 or later.
What is the CVSS score of CVE-2024-5569?
CVE-2024-5569 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-5569?
CVE-2024-5569 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-2024-5569?
Run the dependency tree command: 'pip show zipp'. 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-jfmj-5v4g-7637",
  "modified" : "2024-07-09T17:25:54Z",
  "published" : "2024-07-09T00:31:40Z",
  "aliases" : [ "CVE-2024-5569" ],
  "summary" : "zipp Denial of Service vulnerability",
  "details" : "A Denial of Service (DoS) vulnerability exists in the jaraco/zipp library, affecting all versions prior to 3.19.1. The vulnerability is triggered when processing a specially crafted zip file that leads to an infinite loop. This issue also impacts the zipfile module of CPython, as features from the third-party zipp library are later merged into CPython, and the affected code is identical in both projects. The infinite loop can be initiated through the use of functions affecting the `Path` module in both zipp and zipfile, such as `joinpath`, the overloaded division operator, and `iterdir`. Although the infinite loop is not resource exhaustive, it prevents the application from responding. The vulnerability was addressed in version 3.19.1 of jaraco/zipp.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zipp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.19.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5569"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jaraco/zipp/commit/fd604bd34f0343472521a36da1fbd22e793e14fd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jaraco/zipp"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/be898306-11f9-46b4-b28c-f4c4aa4ffbae"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-09T17:25:54Z",
    "nvd_published_at" : "2024-07-09T00:15:02Z"
  }
}