UTC
High

Keras vulnerable to DoS via Malicious .keras Model (HDF5 Shape Bomb Causes Petabyte Allocation in KerasFileEditor)

CVE-2026-0897 · GHSA-mgx6-5cf9-rr43 · published 2026-05-06 · updated 2026-06-08

Severity
High
CVSS score
7.1
Chance of exploitation (EPSS)
0.33%
Fixed in
3.13.2
  • Exploitation No known exploitation
  • Automatable No
  • Technical impact Partial
  • CISA SSVC
What it is

This vulnerability allows an attacker to crash any system that loads a malicious .keras model file. The attacker can: Cause immediate memory exhaustion (8+ PiB allocation attempts) Crash TensorFlow / Python interpreter Kill Jupyter kernels Break automated model-upload pipelines Crash MLOps servers that process user models Deny service to shared GPU/CPU environments If a platform allows user-uploaded Keras models (training services, inference endpoints, AutoML tools, Kaggle-style platforms), this becomes a Remote Denial of Service vector. Loading the malicious model consumed all system RAM and repeatedly terminated the runtime.

What to do

Upgrade keras to 3.13.2 or later.

Affected
PackageRegistryAffectedFixed in
kerasPyPI>= 3.0.0, <= 3.12.03.12.1
kerasPyPI>= 3.13.0, < 3.13.23.13.2

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].