# CVE-2025-8291: ZIP64 End of Central Directory (EOCD) Locator record offset not checked

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.3
- **CVSS:** 4.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.66% (percentile 47, 2026-11-26)
- **CWE:** CWE-1285
- **Published:** 2025-10-07T18:10:05.908Z
- **Modified:** 2026-10-08T22:10:00.563Z

## Who should check

- Anyone running Python Software Foundation CPython \< 3.9.24; \>= 3.10.0, \< 3.10.19; \>= 3.11.0, \< 3.11.14; \>= 3.12.0, \< 3.12.12; \>= 3.13.0, \< 3.13.10; \>= 3.14.0, \< 3.14.1

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

## Affected and fixed versions

- Python Software Foundation CPython: \< 3.9.24; \>= 3.10.0, \< 3.10.19; \>= 3.11.0, \< 3.11.14; \>= 3.12.0, \< 3.12.12; \>= 3.13.0, \< 3.13.10; \>= 3.14.0, \< 3.14.1 (cvelist)

## Mitigation

- Upgrade CPython to 3.14.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-8291. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-8291.md
Affected: Python Software Foundation CPython < 3.9.24; >= 3.10.0, < 3.10.19; >= 3.11.0, < 3.11.14; >= 3.12.0, < 3.12.12; >= 3.13.0, < 3.13.10; >= 3.14.0, < 3.14.1
Fixed in: Python Software Foundation CPython 3.9.24, Python Software Foundation CPython 3.10.19, Python Software Foundation CPython 3.11.14, Python Software Foundation CPython 3.12.12, Python Software Foundation CPython 3.13.10, Python Software Foundation CPython 3.14.1

Steps:
1. Search this machine and project for Python Software Foundation CPython: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-8291 being exploited?

There is no confirmed exploitation: CVE-2025-8291 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.66% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-8291?

Medium: CVSS 4.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2025-8291?

Python Software Foundation CPython \< 3.9.24; \>= 3.10.0, \< 3.10.19; \>= 3.11.0, \< 3.11.14; \>= 3.12.0, \< 3.12.12; \>= 3.13.0, \< 3.13.10; \>= 3.14.0, \< 3.14.1.

### Is there a fix for CVE-2025-8291?

Yes. Fixed in Python Software Foundation CPython 3.9.24, Python Software Foundation CPython 3.10.19, Python Software Foundation CPython 3.11.14, Python Software Foundation CPython 3.12.12, Python Software Foundation CPython 3.13.10, Python Software Foundation CPython 3.14.1. Upgrade CPython to 3.14.1 or later.

### How do I check if I'm affected by CVE-2025-8291?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://mail.python.org/archives/list/security-announce@python.org/thread/QECOPWMTH4VPPJAXAH2BGTA4XADOP62G/>
- vendor: <https://github.com/psf/advisory-database/blob/main/advisories/python/PSF-2025-12.json>
- patch: <https://github.com/python/cpython/pull/139702>
- patch: <https://github.com/python/cpython/commit/162997bb70e067668c039700141770687bc8f267>
- patch: <https://github.com/python/cpython/commit/333d4a6f4967d3ace91492a39ededbcf3faa76a6>
- patch: <https://github.com/python/cpython/commit/1d29afb0d6218aa8fb5e1e4a6133a4778d89bb46>
- patch: <https://github.com/python/cpython/commit/76437ac248ad8ca44e9bf697b02b1e2241df2196>
- patch: <https://github.com/python/cpython/commit/8392b2f0d35678407d9ce7d95655a5b77de161b4>
- patch: <https://github.com/python/cpython/commit/bca11ae7d575d87ed93f5dd6a313be6246e3e388>
- patch: <https://github.com/python/cpython/commit/d11e69d6203080e3ec450446bfed0516727b85c3>
- exploit: <https://github.com/google/security-research/security/advisories/GHSA-hhv7-p4pg-wm6p>
- other: <https://github.com/python/cpython/issues/139700>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-8291>

HTML: <https://flawdb.com/CVE-2025-8291> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-8291>
