BIT-libpython-2025-8291: ZIP64 End of Central Directory (EOCD) Locator record offset not checked
The 'zipfile' module would not check the validity of the ZIP64 End of Central Directory (EOCD) Locator record offset value would not be used to locate the ZIP64 EOCD record, instead the ZIP64 EOCD record would be assumed to be the previous record in the ZIP archive. This could be abused to create ZIP archives that are handled differently by the 'zipfile' module compared to other ZIP implementations.
Remediation maintains this behavior, but checks that the offset specified in the ZIP64 EOCD Locator record matches the expected value.
Affected Software
Event History
Frequently Asked Questions
What must an attacker do to exploit this issue?
An attacker must convince a user or application to process a specially crafted ZIP64 archive with Python's zipfile module. No privileges are required, but user interaction is required.
What is the practical impact of a successful exploit?
The crafted archive may be interpreted differently by Python's zipfile module than by other ZIP implementations. The stated impact is integrity-related; no confidentiality or availability impact is indicated.
How can I tell whether my application may be affected?
Applications may be affected if they use Python's zipfile module to read ZIP64 archives from untrusted or externally supplied sources. The provided data does not identify specific Python versions or configurations.
What can be done before remediation is available?
Avoid processing untrusted ZIP64 archives with the affected module where practical, and validate archives with an independent ZIP implementation if differing archive interpretation would create a security risk.