CVE-2025-8291
ZIP64 End of Central Directory (EOCD) Locator record offset not checked
Check your servers for CVE-2025-8291
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-8291 affects cpython, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.49%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 43.7% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 29 Oct 2025):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-1285 Improper Validation of Specified Index, Position, or Offset in Input
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| CPython |
affected before 3.9.24 affected from 3.10.0, before 3.10.19 affected from 3.11.0, before 3.11.14 affected from 3.12.0, before 3.12.12 affected from 3.13.0, before 3.13.10 affected from 3.14.0, before 3.14.1
Other versions: unaffected
|
Is my server affected?
Find the installed version of cpython and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i cpython
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-8291 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-8291RHEL, Rocky, Alma, Fedora
rpm -q cpython
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-8291Alpine
apk list --installed | grep -i cpythonWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-8291
trivy image --scanners vuln IMAGE | grep CVE-2025-8291
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://mail.python.org/archives/list/security-announce@python.org/thread/QECOPWMTH4VPPJAXAH2BGTA4XADOP62G/ mail.python.org · vendor advisory
- https://github.com/psf/advisory-database/blob/main/advisories/python/PSF-2025-12.json github.com · vendor advisory
Patches and release notes
- https://github.com/python/cpython/pull/139702 github.com · patch
- https://github.com/python/cpython/commit/162997bb70e067668c039700141770687bc8f267 github.com · patch
- https://github.com/python/cpython/commit/333d4a6f4967d3ace91492a39ededbcf3faa76a6 github.com · patch
- https://github.com/python/cpython/commit/1d29afb0d6218aa8fb5e1e4a6133a4778d89bb46 github.com · patch
- https://github.com/python/cpython/commit/76437ac248ad8ca44e9bf697b02b1e2241df2196 github.com · patch
- https://github.com/python/cpython/commit/8392b2f0d35678407d9ce7d95655a5b77de161b4 github.com · patch
- https://github.com/python/cpython/commit/bca11ae7d575d87ed93f5dd6a313be6246e3e388 github.com · patch
- https://github.com/python/cpython/commit/d11e69d6203080e3ec450446bfed0516727b85c3 github.com · patch
Exploits and proof of concept
- https://github.com/google/security-research/security/advisories/GHSA-hhv7-p4pg-wm6p github.com · technical description, exploit
Other references
- https://github.com/python/cpython/issues/139700 github.com · issue tracking
Source: the record CVE-2025-8291 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse