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

High 7.1 Published Updated

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.

PackageAffectedFixed in
keras PyPIFrom 3.0.03.12.1
keras PyPIFrom 3.0.03.12.1
keras PyPIFrom 3.0.03.13.1
keras PyPIFrom 3.13.03.13.2
keras PyPIFrom 3.13.03.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.

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.

Is CVE-2026-0897 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free