Intel

AIKIDO-2026-290660

keras is vulnerable to Unsafe Deserialization

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

75

CVE Score

High

Unsafe Deserialization

Are you affected? Scan for Free

TL;DR

keras.datasets.imdb.load_data and reuters.load_data loaded their .npz archives with np.load(allow_pickle=True), and cifar10/cifar100 batch loading used a bare cPickle.load. A crafted or tampered dataset file can therefore unpickle arbitrary objects and run code through a pickle __reduce__ gadget. The fix routes these loaders through a numpy-only RestrictedUnpickler that permits only array reconstruction, so genuine datasets still load while gadget payloads are refused.

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 IMDB, Reuters, or CIFAR dataset files that an attacker can replace or supply (for example a poisoned local cache or a custom path to untrusted archives).

Package

Versions

3.0.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 Unsafe Deserialization in versions 3.0.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