CVE-2026-0897 Denial of Service in Keras via Excessive Memory Allocation in HDF5 Metadata
A remote attacker can cause a denial of service via memory exhaustion by providing a crafted Keras archive with an excessively large HDF5 dataset shape.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-0897?
CVE-2026-0897 is a high-severity denial of service vulnerability in Google Keras, published on 15 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-770
Which versions are affected by CVE-2026-0897?
5 open source packages ship an affected version, including keras. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
keras PyPI | From 3.0.0 | 3.12.1 |
keras PyPI | From 3.0.0 | 3.12.1 |
keras PyPI | From 3.0.0 | 3.13.1 |
keras PyPI | From 3.13.0 | 3.13.2 |
keras PyPI | From 3.13.0 | 3.13.2 |
Products include Keras Keras.
How do I fix CVE-2026-0897?
Upgrade keras to a fixed version for your release line: 3.12.1, 3.13.1 or 3.13.2.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-0897 being exploited?
There is no known exploitation of CVE-2026-0897 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Google Keras
- CVE-2024-3660 Arbitrary code injection vulnerability in Keras framework < 2.13
- CVE-2026-12481 Deserialization of Untrusted Data in keras-team/keras
- CVE-2026-1462 Safe Mode Bypass in keras-team/keras
- CVE-2025-9906 Arbitrary Code execution in Keras Safe Mode
- CVE-2025-8747 Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
Sources
Also known as AZL-74631, DEBIAN-CVE-2026-0897, GHSA-mgx6-5cf9-rr43, MINI-h5jp-w9f3-8f63, PYSEC-2026-73, UBUNTU-CVE-2026-0897.