CVE-2026-12570
Description
A flaw was found in Keras. When loading malicious .keras model files using the keras.models.load_model() function, the H5IOStore.getitem method does not validate the shape or size of datasets. This can lead to unbounded memory allocation, allowing a malicious actor to trigger an out-of-memory condition and cause a denial of service. This vulnerability poses a risk to machine learning pipelines that process untrusted models.
Statement
Red Hat ships Keras across multiple OpenShift AI (RHOAI) model-serving and workbench images: KServe agent, controller, router, and storage-initializer images, the ModelMesh runtime adapter image, TensorFlow pipeline-runtime images, and Jupyter TensorFlow workbench images (CUDA and ROCm variants). The keras.models.load_model() function does not validate HDF5 dataset shape or size when loading .keras model files, allowing a malicious or untrusted model file to trigger unbounded memory allocation and a denial of service (out-of-memory) on the serving/workbench pod.
Mitigation
Only load .keras model files from trusted sources; do not load user-supplied or externally-sourced model files without validation. Apply pod-level memory limits/requests to constrain the blast radius of an out-of-memory condition until an upstream fix is available.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5 | N/A | 5.5 |
| Attack Vector | Local | N/A | Local |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | Low | N/A | None |
| User Interaction | Required | N/A | Required |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | None | N/A | None |
| Integrity Impact | None | N/A | None |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
cve.org: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)
When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.