CVE-2026-12480 Arbitrary HDF5 File Read via Virtual Dataset Bypass in keras-team/keras

Medium 5.5 Published Updated

Attackers can read arbitrary files from the victim's filesystem by crafting malicious Keras model files that exploit virtual dataset handling flaws.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-12480?

CVE-2026-12480 is a medium-severity path traversal vulnerability in keras-team/keras, published on 1 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Keras versions up to and including 3.13.2 are vulnerable to an arbitrary HDF5 file read due to an incomplete fix for CVE-2026-1669. The vulnerability resides in the `H5IOStore._verify_dataset()` and `file_editor.py` methods, which fail to check the `dataset.is_virtual` property of HDF5 datasets. This allows an attacker to craft a malicious `.keras` model archive or `.h5` weights file containing a Virtual Dataset (VDS) that references external HDF5 files on the victim's filesystem. When the victim loads the model using `keras.models.load_model()` or `keras.saving.load_model()`, the external file is transparently read, leading to potential information disclosure. Fixed in versions 3.12.2 and 3.14.1.

Weakness: CWE-73

Which versions are affected by CVE-2026-12480?

5 open source packages ship an affected version, including keras.

PackageAffectedFixed in
keras PyPIAll versions3.12.3, 3.15.0
keras PyPIAll versions3.12.3
keras PyPIAll versions3.12.3
keras PyPIFrom 3.13.03.15.0
keras PyPIFrom 3.13.03.15.0

How do I fix CVE-2026-12480?

Upgrade keras to a fixed version for your release line: 3.12.3 or 3.15.0.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-12480 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-12480 exists.

Sources

Also known as AZL-92027, DEBIAN-CVE-2026-12480, GHSA-26c4-7vv6-867j, MINI-53c4-pr5f-8h8m, PYSEC-2026-3629, UBUNTU-CVE-2026-12480.

Is CVE-2026-12480 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free