Keras: HDF5 links can disclose local file contents
Moderate severity
GitHub Reviewed
Published
Aug 2, 2026
to the GitHub Advisory Database
•
Updated Aug 7, 2026
Description
Published by the National Vulnerability Database
Aug 2, 2026
Published to the GitHub Advisory Database
Aug 2, 2026
Reviewed
Aug 7, 2026
Last updated
Aug 7, 2026
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
KerasFileEditorandkeras.saving.load_weightsfunctions bypass thesafe_get_h5_groupandsafe_get_h5_datasethelpers, 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,KerasFileEditorextracts attributes and datasets from linked files into its internal structures, whilekeras.saving.load_weightsloads weights from linked files into the user's model. This issue can be exploited by providing a malicious.h5,.weights.h5, or.kerasfile containing ExternalLinks.References