Intel

AIKIDO-2026-408481

keras is vulnerable to Denial of Service (DoS)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 4, 2026
August 4, 2026

58

CVE Score

Medium

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

Affected versions of keras guard .keras archives against decompression bombs only on the in-memory reads of config.json, model.weights.h5, and the sharded weight map. When an archive has more than three members, keras.saving.load_model builds a disk-backed DiskIOStore that extracts every ZIP member with ZipFile.extractall, with path-traversal filtering but no per-member decompression-ratio check. An attacker-added member that decompresses far beyond its stored size can therefore write hundreds of MB to GB to disk from a small archive under the default safe_mode=True, exhausting disk space and denying service. The fix adds _reject_zip_extract_bomb, which rejects members whose declared-to-stored size ratio exceeds the threshold before extraction.

How do I fix this?

Upgrade the keras library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you load .keras model archives that contain assets from untrusted sources.

Package

Versions

3.3.0 - 3.12.3

Fixed in 3.12.4

3.13.0 - 3.15.0

Fixed in 3.15.1

Background info

keras is vulnerable to Denial of Service (DoS) in versions 3.3.0 - 3.12.3 and 3.13.0 - 3.15.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea