Improper Handling of HDF5 ExternalLinks in keras-team/keras
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-22 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| keras-team | keras-team/keras | before 3.12.3, 3.15.0 | 3.12.3, 3.15.0 | Patch available | CNA |
| — | keras (PyPI) | before 3.12.3 | 3.12.3 | Patch available | GHSA-m8wh-29wm-52mv |
| — | keras (PyPI) | 3.13.0 to before 3.15.0 | 3.15.0 | Patch available | GHSA-m8wh-29wm-52mv |
- keras-team/keras Vendorkeras-team Affected before 3.12.3, 3.15.0 Fixed in 3.12.3, 3.15.0 Patch available CNA
- keras (PyPI) Vendor— Affected before 3.12.3 Fixed in 3.12.3 Patch available GHSA-m8wh-29wm-52mv
- keras (PyPI) Vendor— Affected 3.13.0 to before 3.15.0 Fixed in 3.15.0 Patch available GHSA-m8wh-29wm-52mv
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:* | — | — | keras-team |
- cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:* Versions — — ·keras-team
Remediation
- Fix · CNA keras-team/keras (keras-team) Fixed in 3.12.3, 3.15.0
- Fix · GHSA-m8wh-29wm-52mv keras (PyPI) Fixed in 3.12.3 Advisory →
- Fix · GHSA-m8wh-29wm-52mv keras (PyPI) Fixed in 3.15.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-9335
- 2026-10-03 Alias added: GHSA-m8wh-29wm-52mv
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
Other 8
- https://huntr.com/bounties/876a7226-5428-4a66-9d05-232461120db5
- https://github.com/keras-team/keras/commit/23370f16b0ab9a200f7550a34e54a3ceab74ba0e
- https://github.com/keras-team/keras/pull/22899
- https://github.com/keras-team/keras/pull/23165
- https://github.com/keras-team/keras/commit/d338a45204bdc787c8b3c4a9b82c1911cd52dedf
- https://github.com/keras-team/keras
- https://github.com/keras-team/keras/releases/tag/v3.12.3
- https://github.com/keras-team/keras/releases/tag/v3.15.0
More keras-team vulnerabilities
- TI-2025-31626 Deserialization of untrusted data in keras-team Keras CVSS 3.1CRITICAL 9.8
- TI-2026-10715 Deserialization of Untrusted Data in keras-team/keras CVSS 3.1CRITICAL 9.8
- TI-2026-01159 Safe Mode Bypass in keras-team/keras CVSS 3.0HIGH 8.8
- TI-2025-08001 Keras safe_mode bypass allows arbitrary code execution when loading a malicious model. CVSS 4.0HIGH 8.6
- TI-2026-10199 Path Traversal in keras-team/keras CVSS 3.0HIGH 8.1
- TI-2025-11591 Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file() CVSS 3.0HIGH 8.0
Sources
- CVE-2026-9335 · CVE Program
- CVE-2026-9335 · NVD
- FIRST EPSS
- GHSA-m8wh-29wm-52mv · GitHub Advisory Database · CC BY 4.0
- CVE-2026-9335 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences