7.3High

CVE-2025-1550Arbitrary Code Execution via Crafted Keras Config for Model Loading

Google Keras Published: (1 year ago)

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.

Weakness (CWE): CWE-94

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
Google Keras 3.0.0 – < 3.8.0
keras keras 3.0.0 – < 3.8.0

References and patches

CPE matches (NVD) (1)

  • cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:* ≥ 3.0.0 < 3.8.0