Skip to content
OpenAdvisories
Medium · 6.5 Public exploit CVE-2026-9335 EUVD-2026-51922GHSA-m8wh-29wm-52mvPYSEC-2026-3633

Improper Handling of HDF5 ExternalLinks in keras-team/keras

Published Aug 2, 2026 · Updated Aug 3, 2026 · Assigned by @huntr_ai

Description

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.

Affected products

VendorProductAffectedFixed
keras-team keras-team/keras unspecified – < 3.12.3, 3.15.0 3.12.3, 3.15.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 keras No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS keras No fix yet —
Ubuntu 18.04 LTS keras No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI keras < 3.12.3 3.12.3 GHSA-m8wh-29wm-52mv
PyPI keras >= 3.13.0, < 3.15.0 3.15.0 GHSA-m8wh-29wm-52mv
PyPI keras < 3.12.3 · >= 3.13.0, < 3.15.0 3.12.3, 3.15.0 PYSEC-2026-3633

References