CVE-2026-0897: Keras Denial of Service Vulnerability in HDF5 Weight Loading Component

keras Updated 15 Jan 2026

Summary

15/01/2026
Yes i
High
7.1

CVE-2026-0897: Google Keras Allocates Resources Without Limits or Throttling in the HDF5 weight loading component. Affects keras versions >= 3.0.0, < 3.13.1. Fixed in 3.13.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Google Keras is an open-source neural network library written in Python, designed to simplify the process of building and training deep learning models. It provides a user-friendly API and supports multiple backends, making it a popular choice among developers and researchers. However, versions 3.0.0 through 3.13.0 are vulnerable to a Denial of Service (DoS) attack due to improper resource allocation in the HDF5 weight loading component.

Vulnerability Detail

The vulnerability arises from the HDF5 weight loading component in Google Keras, where it allocates resources without limits or throttling. This allows a remote attacker to exploit the system by sending a crafted .keras archive containing a valid model.weights.h5 file with an extremely large dataset shape. The result is memory exhaustion, leading to a crash of the Python interpreter and causing a Denial of Service (DoS). The vulnerability is classified under CWE-770, indicating improper resource management.

How To Fix

Latest published version: 3.15.1 as of 22 Oct 2026

pip install --upgrade "keras==3.15.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.13.1

This is the first release that contains the fix.

pip install --upgrade "keras==3.13.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid loading .keras archives from untrusted sources or ensure that the datasets within the archives do not declare excessively large shapes. This can help mitigate the risk of triggering the vulnerability until an update can be applied.

Conclusion

The vulnerability identified as CVE-2026-0897 in Google Keras poses a significant risk due to improper resource allocation in the HDF5 weight loading component. Users are advised to update to version 3.13.1 or later to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor for such vulnerabilities effectively.

See every vulnerability recorded for keras →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.1, indicating a high severity level.

Keras versions from 3.0.0 to 3.13.0 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If you cannot update Keras immediately, avoid loading .keras archives from untrusted sources and ensure that datasets do not declare excessively large shapes as a temporary measure.

Vulert is a tool that monitors and alerts in real-time for open-source vulnerabilities in your software using just the Pipfile.lock. It helps you stay informed about potential vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for keras.

How To Fix

Latest published version: 3.15.1 as of 22 Oct 2026

pip install --upgrade "keras==3.15.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.13.1

This is the first release that contains the fix.

pip install --upgrade "keras==3.13.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback