CVE-2026-1669

7.5 HIGH

📋 TL;DR

This vulnerability allows remote attackers to read arbitrary local files on systems running vulnerable Keras versions by exploiting a flaw in the HDF5 model loading mechanism. Attackers can craft malicious .keras model files containing external dataset references to access sensitive information. All users of Keras versions 3.0.0 through 3.13.1 are affected.

💻 Affected Systems

Products:
  • Keras
Versions: 3.0.0 through 3.13.1
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the HDF5 integration for model loading; any application that loads untrusted .keras model files is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through credential theft, sensitive data exfiltration, and lateral movement by reading SSH keys, configuration files, and other critical system files.

🟠

Likely Case

Disclosure of sensitive application data, configuration files, and potentially credentials stored in accessible file paths.

🟢

If Mitigated

Limited impact with proper file permissions, network segmentation, and input validation preventing malicious model uploads.

🌐 Internet-Facing: HIGH - Remote attackers can exploit this without authentication by uploading crafted model files to vulnerable endpoints.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems could exploit this to escalate privileges and access sensitive files.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the attacker to craft a malicious .keras file with HDF5 external dataset references and have it loaded by the vulnerable system.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Keras 3.14.0 or later

Vendor Advisory: https://github.com/google/security-research/security/advisories

Restart Required: No

Instructions:

1. Update Keras to version 3.14.0 or later using pip: 'pip install --upgrade keras>=3.14.0' 2. Verify the update completed successfully. 3. Test model loading functionality.

🔧 Temporary Workarounds

Disable HDF5 model loading

all

Disable loading of HDF5-based .keras model files if not required

Configure application to reject .keras files or implement custom model loading validation

Input validation and sandboxing

all

Validate and sanitize all model file inputs before processing

Implement file type validation, size limits, and run model loading in restricted environments

🧯 If You Can't Patch

  • Implement strict file upload controls and only allow trusted model sources
  • Apply principle of least privilege to file system access and run Keras with minimal permissions

🔍 How to Verify

Check if Vulnerable:

Check Keras version: 'python -c "import keras; print(keras.__version__)"' - if version is between 3.0.0 and 3.13.1 inclusive, system is vulnerable.

Check Version:

python -c "import keras; print(keras.__version__)"

Verify Fix Applied:

After updating, verify version is 3.14.0 or later using same command and test loading model files.

📡 Detection & Monitoring

Log Indicators:

  • Failed model loading attempts
  • Unusual file access patterns from Keras processes
  • Errors related to HDF5 external dataset resolution

Network Indicators:

  • Uploads of .keras model files to vulnerable endpoints
  • Outbound data transfers following model file processing

SIEM Query:

source="keras" AND (event="model_load" OR event="file_access") AND (file_path="*" OR error="*external dataset*")

🔗 References

📤 Share & Export