The vulnerability (CVE-2024-8088) causes an infinite loop when processing maliciously crafted zip archives due to malformed entry names, particularly those with repeating slashes. The core issue was identified in the _ancestry function (present in both Lib/zipfile/_path/__init__.py and Lib/zipfile.py across different versions/contexts). The original loop condition in _ancestry (while path and path != posixpath.sep:) did not correctly handle paths where posixpath.split failed to reduce the path string, leading to an infinite loop. Commits like 2231286d78d328c2f575e0b05b16fe447d1656d6 and 7bc367e464ce50b956dd232c1dfa1cad4e7fb814 fixed this by changing the loop condition to while path.rstrip(posixpath.sep):, ensuring progress. Functions like zipfile.Path.iterdir, zipfile.ZipFile.namelist, and zipfile.ZipFile.extractall are listed as vulnerable because they either directly or indirectly use this path processing logic or handle the malformed names that trigger the vulnerability, and they are explicitly mentioned in the vulnerability description as affected methods. The initial patches involving SanitizedNames._sanitize also highlight that name processing is central to the vulnerability, even though this specific mitigation was later refined to a more direct fix in _ancestry.