CVE-2026-12570
JSON

5.5medium

Denial of Service via HDF5 Shape Bomb in keras.models.load_model() in keras-team/keras

Severity
5.5medium CVSS:3.0 by @huntr_ai
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-74m6-m3xx-3vmjPYSEC-2026-3856

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.

Affected

Product or packageVersionsReported by
keras-team keras-team/kerasfrom unspecified before 3.12.3, 3.15.0CVE List
keras (PyPI)before 3.15.0GitHub Advisory Database, PyPA Advisory Database

All scores

@huntr_ai5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHub5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
PyPA Advisory Database5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-770

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Una vulnerabilidad en las versiones menor o igual que 3.15.0 de keras-team/keras permite un ataque de denegación de servicio (DoS) al cargar archivos de modelo .keras maliciosos a través de la función keras.models.load_model(). El método H5IOStore.__getitem__ en keras/src/saving/saving_lib.py no valida la forma o el tamaño de los conjuntos de datos, lo que lleva a una asignación de memoria ilimitada. Un archivo .keras especialmente diseñado puede explotar esta falla para desencadenar una condición de falta de memoria (OOM), lo que provoca la terminación del proceso (código de salida 137). Este problema elude la corrección para CVE-2026-0897, que solo abordó una vulnerabilidad similar en KerasFileEditor. El vector de ataque incluye modelos envenenados de repositorios públicos o registros de modelos maliciosos, lo que representa un riesgo para las tuberías de aprendizaje automático que procesan modelos no confiables.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-12570 changed 2026-08-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-74m6-m3xx-3vmj changed 2026-09-10CC-BY-4.0
NVDCVE-2026-12570 changed 2026-10-23Public domain
PyPA Advisory DatabasePYSEC-2026-3856 changed 2026-09-10CC-BY-4.0