Skip to content

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

HighCVSS 7.3 EPSS 2.6% Public exploit
Published
Updated
Exploit status
Public exploit available
CISA SSVC
Proof of concept public · automatable: no · technical impact: total

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.

Upgrade path

4 packages: 4 fixed.

PackageAffectedFixed inStatus
azure linux keras(Azure Linux 3.0) < 3.3.3-2 3.3.3-2 Fixed
Google Keras(PyPI) >= 3.0.0, < 3.8.0 3.8.0 Fixed
Keras >= 3.0.0, < 3.8.0 3.8.0 Fixed
pypi keras(PyPI) = 3.0.0; = 3.0.1; = 3.0.2; = 3.0.3 +18 more 3.8.0, 3.9.0 Fixed

Affected products

ProductAffected versionsFixed in
pypi keras(PyPI) >= 3.0.0, < 3.9.0 3.9.0
pypi keras(PyPI) = 3.0.0 No fix listed
pypi keras(PyPI) = 3.0.1 No fix listed
pypi keras(PyPI) = 3.0.2 No fix listed
pypi keras(PyPI) = 3.0.3 No fix listed
pypi keras(PyPI) = 3.0.4 No fix listed
pypi keras(PyPI) = 3.0.5 No fix listed
pypi keras(PyPI) = 3.1.0 No fix listed
pypi keras(PyPI) = 3.1.1 No fix listed
pypi keras(PyPI) = 3.2.0 No fix listed
pypi keras(PyPI) = 3.2.1 No fix listed
pypi keras(PyPI) = 3.3.0 No fix listed
pypi keras(PyPI) = 3.3.1 No fix listed
pypi keras(PyPI) = 3.3.2 No fix listed
pypi keras(PyPI) = 3.3.3 No fix listed
pypi keras(PyPI) = 3.4.0 No fix listed
pypi keras(PyPI) = 3.4.1 No fix listed
pypi keras(PyPI) = 3.5.0 No fix listed
pypi keras(PyPI) = 3.6.0 No fix listed
pypi keras(PyPI) = 3.7.0 No fix listed
pypi keras(PyPI) = 3.8.0 No fix listed
pypi keras(PyPI) >= 3.0.0, < 3.8.0 3.8.0
azure linux keras(Azure Linux:3.0) < 3.3.3-2 3.3.3-2
Google Keras(PyPI) >= 3.0.0, < 3.8.0 3.8.0
Keras >= 3.0.0, < 3.8.0 3.8.0

References