{"id":"CVE-2026-9335","published":"2026-08-02T03:49:25Z","modified":"2026-08-03T16:48:20Z","title":"Improper Handling of HDF5 ExternalLinks in keras-team/keras","vendor":"keras-team","product":"keras-team/keras","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00767,"percentile":0.56427,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://huntr.com/bounties/876a7226-5428-4a66-9d05-232461120db5","tags":[]},{"url":"https://github.com/keras-team/keras/commit/23370f16b0ab9a200f7550a34e54a3ceab74ba0e","tags":[]}],"priority":{"score":20.8,"factors":[{"name":"EPSS percentile","points":11.29},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.55}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-09-02","earliestUrl":"https://github.com/paparojonathan/CVE-2026-9335-keras-hdf5-externallink","repos":[{"name":"paparojonathan/CVE-2026-9335-keras-hdf5-externallink","url":"https://github.com/paparojonathan/CVE-2026-9335-keras-hdf5-externallink","stars":0,"created":"2026-09-02"}]},"first":{"date":"2026-09-02","source":"PoC-in-GitHub","url":"https://github.com/paparojonathan/CVE-2026-9335-keras-hdf5-externallink"},"provenance":"source"},"vendorSlug":"keras-team","affectedVersions":[{"vendor":"keras-team","product":"keras-team/keras","versions":[">= unspecified, < 3.12.3, 3.15.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-03T16:48:07.910437Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"keras","vulnerableRanges":["<3.12.3",">=3.13.0, <3.15.0"],"patched":["3.12.3","3.15.0"],"from":["GHSA-m8wh-29wm-52mv","PYSEC-2026-3633"],"provenance":"source"}],"summary":{"text":"The flaw is in keras-team/keras (versions up to and including 3.14.0), where the KerasFileEditor class and the keras.saving.load_weights function fail to block HDF5 ExternalLinks: they bypass the safe_get_h5_group and safe_get_h5_dataset helpers and automatically dereference links to external HDF5 files. An attacker who can get a victim to open a malicious .h5, .weights.h5, or .keras file containing ExternalLinks, which requires user interaction, can read arbitrary HDF5 content from the victim's local filesystem, with the data pulled into the editor's structures or the loaded model's weights.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:28:59Z"},"euvd":{"id":"EUVD-2026-51922","exploited":false,"provenance":"source"}}