CVE-2026-12570
Received Received - Intake

Denial of Service in Keras via Malicious .keras Model

Vulnerability report for CVE-2026-12570, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-10

Last updated on: 2026-08-10

Assigner: huntr.dev

Description

A vulnerability in keras-team/keras versions <= 3.15.0 allows for a denial of service (DoS) attack when loading malicious .keras model files via the keras.models.load_model() function. The H5IOStore.__getitem__ method in keras/src/saving/saving_lib.py does not validate the shape or size of datasets, leading to unbounded memory allocation. A specially crafted .keras file can exploit this flaw to trigger an out-of-memory (OOM) condition, causing the process to be terminated (exit code 137). This issue bypasses the fix for CVE-2026-0897, which only addressed a similar vulnerability in KerasFileEditor. The attack vector includes poisoned models from public repositories or malicious model registries, posing a risk to machine learning pipelines that process untrusted models.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-10
Last Modified
2026-08-10
Generated
2026-08-10
AI Q&A
2026-08-10
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
keras-team keras to 3.15.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-770 The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a denial of service (DoS) flaw in Keras versions up to 3.15.0. It occurs when loading malicious .keras model files using keras.models.load_model(). The issue is in the H5IOStore.__getitem__ method which fails to validate dataset shapes or sizes, allowing unbounded memory allocation. A crafted .keras file can trigger an out-of-memory (OOM) condition, crashing the process with exit code 137. The attack can come from poisoned models in public repositories or malicious registries, threatening machine learning pipelines that handle untrusted models.

Detection Guidance

To detect this vulnerability, monitor for out-of-memory (OOM) errors when loading .keras model files. Check system logs for processes terminated with exit code 137. Inspect model files for unusually large declared shapes in HDF5 datasets using tools like h5ls or h5py in Python. Example command: h5ls -r malicious_model.keras to view dataset shapes.

Impact Analysis

If you use Keras versions <= 3.15.0, an attacker could exploit this to crash your application by loading a malicious model file. This could disrupt services relying on Keras models, cause data loss, or require restarting processes. It poses risks to machine learning pipelines processing untrusted models, especially in automated or batch processing environments.

Compliance Impact

This vulnerability could impact compliance with GDPR and HIPAA by enabling denial-of-service attacks on systems processing untrusted .keras model files. An OOM condition may disrupt services handling sensitive data, potentially violating availability requirements under GDPR Article 32 and HIPAA Security Rule standards for safeguarding protected health information.

Mitigation Strategies

Update Keras to version 3.15.0 or later. Avoid loading untrusted .keras model files. Implement input validation for model files in your pipeline. Use the safe_get_h5_dataset guard to reject datasets with disproportionate declared sizes. Monitor for OOM conditions during model loading.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12570. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart