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 contain a flaw that allows an attacker to read files on the victim’s system through a crafted HDF5 file. The vulnerability lies in the lack of a check for the dataset.is_virtual flag inside H5IOStore._verify_dataset() and file_editor.py. By placing a Virtual Dataset that points to an external HDF5 file within a .keras or .h5 archive, an attacker can cause the Keras loader to read that external file without validation, leading to disclosure of data that should remain confidential. This problem is a classic instance of CWE‑73: External Control of File Name or Path and also involves CWE‑22: Path Traversal, but does not provide code execution or privilege escalation, only data leakage.

Affected Systems

The affected product is Keras from keras-team. All releases from 3.12.0 up to and including 3.13.2 are vulnerable. The vulnerability was fixed in releases 3.12.2 and 3.14.1, and any later version incorporates the fix. Versions beyond 3.14.1 are not affected.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate risk, while the EPSS score of <1% reflects a low probability of exploitation. The flaw is not listed in CISA KEV, and there is no public evidence of active exploitation. The attack vector is inferred to be the delivery of a malicious model file that contains a virtual dataset referencing a local HDF5 file; the file must then be loaded by an application using keras.models.load_model() or keras.saving.load_model(). Because the vulnerability requires the victim to load a crafted file, the exposure is limited to scenarios where untrusted model files are accepted, such as through local uploads or remote distribution.

Generated by OpenCVE AI on July 17, 2026 at 12:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Keras to version 3.12.2, 3.14.1 or later
  • Restrict model loading to trusted sources and avoid exposing endpoints that accept arbitrary .keras or .h5 uploads
  • Configure the application to ignore or sanitize Virtual Dataset references, for example by disabling virtual file support or validating the external file path before loading

Generated by OpenCVE AI on July 17, 2026 at 12:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

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

No data.

cve-icon Redhat

Severity : Moderate

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

Links: CVE-2026-12480 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-17T12:30:05Z

Weaknesses
  • CWE-22

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

  • CWE-73

    External Control of File Name or Path