All reports
High

Arbitrary Code Execution via Crafted Keras Config for Model Loading

Affected versions

Version ranges need review.

PyPIkeras
Affected versions
>=3.0.0 <3.8.0 || =3.0.0 || =3.0.1 || =3.0.2 || =3.0.3 || =3.0.4 || =3.0.5 || =3.1.0 || =3.1.1 || =3.2.0 || =3.2.1 || =3.3.0 || =3.3.1 || =3.3.2 || =3.3.3 || =3.4.0 || =3.4.1 || =3.5.0 || =3.6.0 || =3.7.0
Fixed version
3.8.0
PyPIkeras
Affected versions
>= 3.0.0, < 3.9.0
Fixed version
3.9.0

Exploitation

CVE-2025-1550

Probability of exploitation in the next 30 days: 2.60%

FIRST EPSS · 2026-11-24

Description

Impact

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.

Patches

This problem is fixed starting with version 3.9.

Workarounds

Only load models from trusted sources and model archives created with Keras.

References

Links

Credits

  • io-no