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

Published Aug 22, 2024
·
Updated

Last updated 11 March 2025

Other sources

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.

— NVD

There is a HIGH severity vulnerability affecting the CPython "zipfile" module.

When iterating over names of entries in a zip archive (for example, methods of "zipfile.ZipFile" like "namelist()", "iterdir()", "extractall()", 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.

— Red Hat

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

— Launchpad

Affected Software

16 affected componentsFixes available
alpine/python3<3.10.14-r2
3.10.14-r2
alpine/python3<3.11.8-r1
3.11.8-r1
alpine/python3<3.11.9-r1
3.11.9-r1
alpine/python3<3.12.3-r2
3.12.3-r2
alpine/python3<3.12.5-r1
3.12.5-r1
alpine/python3<3.12.5-r1
3.12.5-r1
alpine/python3<3.12.5-r1
3.12.5-r1
alpine/python3<3.12.5-r1
3.12.5-r1
debian/pypy3<=7.3.11+dfsg-2+deb12u3
7.3.19+dfsg-28.0.1+dfsg-1
debian/python3.11
3.11.2-6+deb12u83.11.2-6+deb12u9
debian/python3.13
3.13.5-2+deb13u53.13.18-1
debian/pypy3*
debian/pypy3<7.3.18+dfsg-1
7.3.18+dfsg-1
debian/pypy3<7.3.18+dfsg-1
7.3.18+dfsg-1
debian/python3.11<3.11.2-6+deb12u3
3.11.2-6+deb12u3
debian/python3.13<3.13.0~rc2-1
3.13.0~rc2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.10.14-r2
  2. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.11.8-r1
  3. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.11.9-r1
  4. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.12.3-r2
  5. Upgrade

    Upgrade alpine/python3 to a version that resolves this vulnerability.

    Fixed in 3.12.5-r1
  6. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.19+dfsg-2Fixed in 8.0.1+dfsg-1
  7. Upgrade

    Upgrade debian/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.2-6+deb12u8Fixed in 3.11.2-6+deb12u9
  8. Upgrade

    Upgrade debian/python3.13 to a version that resolves this vulnerability.

    Fixed in 3.13.5-2+deb13u5Fixed in 3.13.18-1
  9. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.18+dfsg-1
  10. Upgrade

    Upgrade debian/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.2-6+deb12u3
  11. Upgrade

    Upgrade debian/python3.13 to a version that resolves this vulnerability.

    Fixed in 3.13.0~rc2-1

Event History

Aug 22, 2024
CVE Published
via MITRE·06:45 PM
Data Sourced
via MITRE·06:45 PM
DescriptionWeakness
Data Sourced
via OSV·06:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·07:15 PM
Affected Software
Data Sourced
via Red Hat·07:20 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-8088?

CVE-2024-8088 is classified as a HIGH severity vulnerability affecting the CPython zipfile module.

2

How do I fix CVE-2024-8088?

To fix CVE-2024-8088, update to the latest versions of the affected CPython packages listed in the vulnerability report.

3

Which versions of CPython are affected by CVE-2024-8088?

CVE-2024-8088 affects specific versions of Python 2.7 and several versions of Python 3.9, 3.11, 3.12, and 3.13.

4

Is the zipfile.ZipFile class affected by CVE-2024-8088?

No, the more commonly used zipfile.ZipFile class is not affected by CVE-2024-8088.

5

What should I do if I am using an affected version of CPython with CVE-2024-8088?

If using an affected version of CPython with CVE-2024-8088, it's crucial to upgrade to a non-vulnerable version promptly.

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