Skip to content
KerasGHSA-m8wh-29wm-52mv

Keras: HDF5 links can disclose local file contents

Medium6.5CVE-2026-9335 · Published Aug 2, 2026 · updated Aug 10, 2026

GitHub advisory

Affected versions

PackageAffectedFixed in
keras
PyPI
< 3.12.33.12.3
>= 3.13.0, < 3.15.03.15.0
Details and references

A vulnerability in keras-team/keras versions <= 3.14.0 allows arbitrary local HDF5 file content disclosure due to improper handling of HDF5 ExternalLinks. The `KerasFileEditor` and `keras.saving.load_weights` functions bypass the `safe_get_h5_group` and `safe_get_h5_dataset` helpers, which are designed to reject ExternalLinks and SoftLinks. This results in automatic dereferencing of links to external HDF5 files, enabling attackers to disclose sensitive data from the victim's local filesystem. Specifically, `KerasFileEditor` extracts attributes and datasets from linked files into its internal structures, while `keras.saving.load_weights` loads weights from linked files into the user's model. This issue can be exploited by providing a malicious `.h5`, `.weights.h5`, or `.keras` file containing ExternalLinks.

CVSS 3.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-22
Also known as
CVE-2026-9335, PYSEC-2026-3633

More Keras advisories

All Keras
DateAdvisory
Aug 10Keras model loading is vulnerable to denial of service through HDF5 shape bombs
CVE-2026-12570Medium5.5fixed in 3.15.0
Jul 19Keras: TorchModuleWrapper can deserialize unsafe PyTorch pickle data
CVE-2026-12484High7.8fixed in 3.12.3, 3.15.0
Jul 14Keras: tar extraction permits symlink-based path traversal
CVE-2026-12482Low3.1fixed in 3.12.3, 3.15.0
Jul 3Keras: Lambda deserialization can bypass safe mode and execute code
CVE-2026-12481High8.8fixed in 3.12.3, 3.15.0
Jul 1Keras: HDF5 virtual datasets can disclose local files
CVE-2026-12480Medium5.5fixed in 3.12.3, 3.15.0
Jun 22Keras: DiskIOStore permits path traversal through crafted layer names
CVE-2026-12479Medium6.1fixed in 3.12.3, 3.15.0

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.