BIT-python-min-2024-8088: Infinite loop when iterating over zip archive entry names from zipfile.Path

Published Aug 22, 2024
·
Updated

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.

Affected Software

1 affected component
Python Software Foundation CPython

Event History

Aug 22, 2024
CVE Published
via OSV·06:45 PM
Data Sourced
via OSV·06:45 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications are exposed if they use zipfile.Path to iterate entry names in ZIP archives that can be controlled by users or other untrusted sources. Programs that do not handle user-controlled ZIP archives are not affected.

2

Does use of the standard zipfile.ZipFile API alone make an application vulnerable?

No. The more common zipfile.ZipFile class is unaffected; the issue specifically affects zipfile.Path and operations such as namelist() and iterdir().

3

What does an attacker need to do to trigger the issue?

An attacker needs to provide a maliciously crafted ZIP archive that the application processes using affected zipfile.Path entry-name iteration. No authentication or user interaction is indicated in the supplied severity vector.

4

What is the operational impact if exploitation succeeds?

Processing the crafted archive can put the affected process into an infinite loop. This can occur while reading archive metadata or while extracting archive contents, causing an availability impact.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203