Keras model loading is vulnerable to denial of service through HDF5 shape bombs
CVE-2026-12570 · GHSA-74m6-m3xx-3vmj · published 2026-08-10 · updated 2026-09-01
- Severity
- Medium
- CVSS score
- 5.5
- Chance of exploitation (EPSS)
- 0.19%
- Fixed in
- 3.15.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
A vulnerability in keras-team/keras versions < 3.15.0 allows for a denial of service (DoS) attack when loading malicious .keras model files via the keras.models.loadmodel() function. The H5IOStore.getitem method in keras/src/saving/savinglib.py does not validate the shape or size of datasets, leading to unbounded memory allocation. A specially crafted .keras file can exploit this flaw to trigger an out-of-memory (OOM) condition, causing the process to be terminated (exit code 137). This issue bypasses the fix for CVE-2026-0897, which only addressed a similar vulnerability in KerasFileEditor.
Upgrade keras to 3.15.0 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| keras | PyPI | < 3.15.0 | 3.15.0 |
- HightsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS@tsparticles/mcp-server
- HighMissing request-wide media budget allows single-request frontend resource exhaustionvllm
- HighMCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length@modelcontextprotocol/hono, @modelcontextprotocol/node, @modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighvLLM : DoS via unvalidated mm_processor_kwargs in multimodal image processors (Isaac, InternVL, H2OVL, etc.)vllm
- HighMCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation@modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighFrame-count cap bypass in VideoMediaIO.load_base64 for video/jpeg via media_io_kwargs.video.num_framesvllm
- CriticalKeras framework vulnerable to deserialization of untrusted datakeras
- CriticalKeras code injection vulnerabilitykeras
- HighKeras: TorchModuleWrapper can deserialize unsafe PyTorch pickle datakeras, keras
- HighKeras: Lambda deserialization can bypass safe mode and execute codekeras, keras
- HighKeras archive extraction utilities allow path traversal and arbitrary file writeskeras
- HighKeras vulnerable to DoS via Malicious .keras Model (HDF5 Shape Bomb Causes Petabyte Allocation in KerasFileEditor)keras, keras
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.