CVE-2025-1550

Arbitrary Code Execution via Crafted Keras Config for Model Loading

State
Published
Severity
7.3 High
Published
Mar 11, 2025
Updated
Jul 24, 2025
Reserved
Feb 21, 2025

Read the record on cve.org

Description

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.

Scores

CVSSScoreVectorSource
4.07.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HGoogle

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
KerasGoogle
  • 3.0.0 to before 3.8.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.