Moderate Security Update for Python 3.12: Addressing Zipfile EOCD Locator Vulnerability

python3.12 Updated 24 Dec 2025

Summary

16/12/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:23323: Moderate: python3.12 security update. Affects python3.12 versions < 3.12.12-1.el9_7. Fixed in 3.12.12-1.el9_7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Python 3.12 is an interpreted, interactive, object-oriented programming language that supports modules, classes, exceptions, and dynamic data types. It provides interfaces to various system calls and libraries, making it a versatile choice for developers. However, it has been identified that the zipfile module in Python 3.12 is vulnerable to a security issue where the End of Central Directory (EOCD) Locator record offset is not properly checked, potentially leading to security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2025-8291, arises from the lack of validation of the EOCD Locator record offset in the zipfile module of Python 3.12. This oversight can be exploited by attackers to manipulate zip files, potentially leading to arbitrary code execution or data corruption. The implications of this vulnerability are significant, as it could compromise the integrity and security of applications relying on Python's zipfile functionality.

How To Fix

Minimum fixed version

3.12.12-1.el9_7

This is the first release that contains the fix.

sudo dnf update python3.12

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the zipfile module for untrusted zip files until the update is applied. Additionally, consider implementing file validation checks before processing zip files to mitigate potential risks.

Conclusion

The vulnerability CVE-2025-8291 in Python 3.12's zipfile module poses significant security risks due to improper handling of zip file structures. It is essential to update to the patched version 3.12.12-1.el9_7 to ensure the security of applications. In the meantime, implementing workarounds can help mitigate potential threats.

See every vulnerability recorded for python3.12 →

Share this vulnerability

FAQ

CVE-2025-8291 is a vulnerability in Python 3.12's zipfile module that allows for improper handling of the End of Central Directory Locator record offset, potentially leading to security issues.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The risks include potential arbitrary code execution and data corruption, which can compromise the security and integrity of applications using the affected Python version.

Yes, a patch is available in version 3.12.12-1.el9_7 of Python 3.12. It is crucial to update to this version to mitigate the vulnerability.

If immediate updating is not possible, avoid using the zipfile module for untrusted zip files and implement additional validation checks on files before processing.

Related vulnerabilities

Recent vulnerabilities recorded for python3.12.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

3.12.12-1.el9_7

This is the first release that contains the fix.

sudo dnf update python3.12

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback