-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
dependenciesThis issue is a problem in a dependency.This issue is a problem in a dependency.feature-requestA feature should be added or improved.A feature should be added or improved.p2This is a standard priority issueThis is a standard priority issue
Description
Vulnerability in Python zipfile
module (ZIP64 EOCD offset validation)
Description / Context
The Python zipfile
module (versions ≤ 3.13.7) does not validate the ZIP64 End of Central Directory (EOCD) Locator offset correctly. Specifically:
- The module assumes the previous record is the ZIP64 EOCD record instead of checking the offset specified in the EOCD Locator.
- This can lead to ZIP archives being interpreted differently than other ZIP implementations.
- Potential risks include:
- Unexpected behavior when extracting ZIP files
- Possible file overwrites
- Security issues in applications relying on
zipfile
for ZIP processing
Reference:
- Python changelog: updating from 3.13.7 → 3.14.1 fixes this by validating the EOCD offset.
Labels
security
docker
python
dependency
Use Case
Impact on our project / Docker images
- Our Docker images currently install Python 3.x from Amazon Linux 2023 repositories.
- The
zipfile
module included in these images is vulnerable if the Python version is ≤3.13.7. - If Python is required in the image, it must be upgraded to ≥3.14.1.
- If Python is not required, it’s safer to remove it entirely, reducing attack surface.
Proposed Solution
Recommended Actions
- Upgrade Python to version ≥3.14.1 in Docker images.
- Rebuild Docker images using the latest OS base image.
- If Python is not required, remove it from the image entirely.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CLI version used
2.31.13
Environment details (OS name and version, etc.)
Ubuntu
dcabib
Metadata
Metadata
Assignees
Labels
dependenciesThis issue is a problem in a dependency.This issue is a problem in a dependency.feature-requestA feature should be added or improved.A feature should be added or improved.p2This is a standard priority issueThis is a standard priority issue