Description
Keras versions up to and including 3.13.2 are vulnerable to an arbitrary HDF5 file read due to an incomplete fix for CVE-2026-1669. The vulnerability resides in the `H5IOStore._verify_dataset()` and `file_editor.py` methods, which fail to check the `dataset.is_virtual` property of HDF5 datasets. This allows an attacker to craft a malicious `.keras` model archive or `.h5` weights file containing a Virtual Dataset (VDS) that references external HDF5 files on the victim's filesystem. When the victim loads the model using `keras.models.load_model()` or `keras.saving.load_model()`, the external file is transparently read, leading to potential information disclosure. Fixed in versions 3.12.2 and 3.14.1.
Published: 2026-07-01
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Keras versions up to and including 3.13.2 can be abused by an attacker who crafts a malicious .keras or .h5 archive containing a Virtual Dataset that points to an external HDF5 file on the victim's filesystem. When the victim loads the model, the loader reads the external file without validating the path or checking the dataset's virtual flag, exposing data that should remain private. The flaw is a classic case of CWE‑73 External Control of File Name or Path and also falls under CWE‑22 Path Traversal; it does not enable code execution or privilege escalation.

Affected Systems

The vulnerable product is Keras provided by keras-team. Releases up to and including 3.13.2 are affected, and the issue is addressed in version 3.12.2 and again in 3.14.1 and later releases.

Risk and Exploitability

The CVSS score of 5.5 indicates a moderate risk and the EPSS score of less than 1 % suggests a low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog, and there is no evidence of active exploitation. The attack vector is inferred to involve delivering a malicious model file that contains a Virtual Dataset reference and then having the victim load that file using keras.models.load_model() or keras.saving.load_model(). Because the flaw requires the victim to load an attacker‑crafted file, exposure is limited to scenarios where untrusted .keras or .h5 files are accepted, such as local uploads or remote model distribution.

Generated by OpenCVE AI on August 3, 2026 at 06:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Keras to version 3.12.2, 3.14.1 or later
  • Ensure that any application using keras.models.load_model() or keras.saving.load_model() only accepts model files from trusted sources; block or tightly validate user‑uploaded or externally distributed .keras or .h5 archives
  • If upgrading is not immediately possible, disable virtual file support or configure the application to reject Virtual Dataset references before loading to prevent external file reads

Generated by OpenCVE AI on August 3, 2026 at 06:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-26c4-7vv6-867j Keras: HDF5 virtual datasets can disclose local files
History

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Keras-team
Keras-team keras
Vendors & Products Keras-team
Keras-team keras

Fri, 03 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}

threat_severity

Moderate


Wed, 01 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 17:15:00 +0000

Type Values Removed Values Added
Description Keras versions up to and including 3.13.2 are vulnerable to an arbitrary HDF5 file read due to an incomplete fix for CVE-2026-1669. The vulnerability resides in the `H5IOStore._verify_dataset()` and `file_editor.py` methods, which fail to check the `dataset.is_virtual` property of HDF5 datasets. This allows an attacker to craft a malicious `.keras` model archive or `.h5` weights file containing a Virtual Dataset (VDS) that references external HDF5 files on the victim's filesystem. When the victim loads the model using `keras.models.load_model()` or `keras.saving.load_model()`, the external file is transparently read, leading to potential information disclosure. Fixed in versions 3.12.2 and 3.14.1.
Title Arbitrary HDF5 File Read via Virtual Dataset Bypass in keras-team/keras
Weaknesses CWE-73
References
Metrics cvssV3_0

{'score': 5.5, 'vector': 'CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}


Subscriptions

Keras-team Keras
cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2026-07-01T17:46:31.093Z

Reserved: 2026-06-17T00:57:28.799Z

Link: CVE-2026-12480

cve-icon Vulnrichment

Updated: 2026-07-01T17:46:20.833Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-01T17:16:19.330

Modified: 2026-07-02T17:55:37.087

Link: CVE-2026-12480

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-01T16:53:32Z

Links: CVE-2026-12480 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T06:15:04Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-73

    External Control of File Name or Path