Skip to content
Info disclosure Disclosed report Intermediate CVE-2026-12480

Keras: HDF5 virtual datasets can disclose local files

Keras failed to check whether an HDF5 dataset was virtual, so a crafted model archive could reference external HDF5 files on the victim's filesystem. Loading the model would transparently read those files, potentially disclosing local information.

keras-team/keras

Originally disclosed on huntr

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.3 and 3.15.0.

From the GitHub Advisory Database (GHSA-26c4-7vv6-867j, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could cause local HDF5 files to be read when a victim loads a malicious model, potentially disclosing their contents.

What the attacker needed

Victim loads a malicious model file

The fix

It was fixed in versions 3.12.3 and 3.15.0.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A model file can contain links to other files on the computer instead of storing data itself. Keras did not check for these links, so opening a malicious model could make it read files the attacker chose. This is an information leak because the attacker may learn the contents of local files.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from keras-team/keras

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.