CPython zipfile.Path: Infinite loop in Python zipfile module (CVE-2024-8088) #shorts #breaking

CVE

This CVE relates to a high-severity vulnerability in the Python zipfile module, specifically targeting zipfile.Path for versions up to and including 3.13.0. Unlike the more common zipfile.ZipFile class, zipfile.Path is vulnerable when handling a maliciously crafted zip archive. This vulnerability can cause processes to enter an infinite loop during operations like iterating over file names or extracting contents. The exploit is triggered when only reading metadata or extracting the content, and mainly affects programs dealing with user-controlled zip archives.

Watch the full video on YouTube: CVE-2024-8088

Remediation and exploitation details

This chain involves the following actors

This following systems are involved

Attack entry point

Remediation actions

Exploitation actions

Related Content

NOTE: The following related content has not been vetted and may be unsafe.

CVE database technical details

CVE ID
CVE-2024-8088
Description
There is a HIGH severity vulnerability affecting the CPython "zipfile" module affecting "zipfile.Path". Note that the more common API "zipfile.ZipFile" class is unaffected. When iterating over names of entries in a zip archive (for example, methods of "zipfile.Path" like "namelist()", "iterdir()", etc) the process can be put into an infinite loop with a maliciously crafted zip archive. This defect applies when reading only metadata or extracting the contents of the zip archive. Programs that are not handling user-controlled zip archives are not affected.
Provider
PSF
CWE / problem types
CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Software Versions
Python Software Foundation:CPython:[{'version': '0', 'lessThan': '3.8.20', 'status': 'affected', 'versionType': 'python'}, {'version': '3.9.0', 'lessThan': '3.9.20', 'status': 'affected', 'versionType': 'python'}, {'version': '3.10.0', 'lessThan': '3.10.15', 'status': 'affected', 'versionType': 'python'}, {'version': '3.11.0', 'lessThan': '3.11.10', 'status': 'affected', 'versionType': 'python'}, {'version': '3.12.0', 'lessThan': '3.12.6', 'status': 'affected', 'versionType': 'python'}, {'version': '3.13.0a1', 'lessThan': '3.13.0rc2', 'status': 'affected', 'versionType': 'python'}]
Date Published
2024-08-22T18:45:31.807Z
Last Updated
2024-10-11T22:03:20.370Z