What’s Vulnerable › Vulnerabilities
CVE-2025-1550: Arbitrary Code Execution via Crafted Keras Config for Model Loading
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2025-03-11 · updated 2026-06-17
- Weakness: CWE-94
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.
Affected products
- keras-team/keras: from 3.0.0 before 3.8.0 — fixed in 3.8.0
How to fix
Upgrade to a fixed version: keras-team/keras 3.8.0. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2025-1550 or the next vulnerability affects your stack