Junglewise Threat Intelligence

CVE-2026-9335: Keras HDF5 arbitrary file disclosure via ExternalLinks

CVE-2026-9335 · Severity: medium · CVSS 6.5 · Published 2026-08-02

Executive brief

A vulnerability in the Keras machine learning library allows for the unauthorized disclosure of local files. By providing a specially crafted model or weight file, an attacker can trick the software into reading other sensitive files on the victim's system, such as other users' model weights or cached data. This could lead to the theft of proprietary AI models or sensitive information stored on shared training clusters.

Technical details

A path traversal and information disclosure vulnerability exists in Keras due to the improper handling of HDF5 ExternalLinks and SoftLinks within the KerasFileEditor and keras.saving.load_weights functions. These components bypass security helpers (safe_get_h5_group and safe_get_h5_dataset) designed to block link dereferencing. An attacker can craft a malicious HDF5-based file containing links to sensitive files on the host filesystem. When a victim loads this file or uses the KerasFileEditor to inspect it, the library automatically follows these links, extracting the target file's contents into internal structures or model weights, which can then be exfiltrated. The issue is addressed in versions 3.12.3 and 3.15.0.

Affected products

  • keras-team Keras <= 3.14.0

Timeline

  • 2026-08-02: disclosed
  • 2026-08-02: advisory
  • 2026-05-20: patched: Initial PR merged for KerasFileEditor fix

References