Skip to content
HighVulnerability

CVE-2025-9906: Keras Model.load_model arbitrary code execution via crafted .keras archive

Identifier
CVE-2025-9906
Published
Record updated
View JSON
Affected
  • keras < 3.11.0
Fixed in
3.11.0
  • released July 29, 2025, 51 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.2%

Summary

CVE-2025-9906 affects the Keras Model.load_model method, which can execute arbitrary code even when safe_mode=True is set. An attacker supplies a specially crafted .keras archive whose config.json calls keras.config.enable_unsafe_deserialization() to disable safe mode, then includes a Lambda layer carrying pickled Python code. Both must be in the same archive, with the deserialization call placed first.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.