Skip to content
OpenAdvisories
High · 7.3 Public exploit CVE-2025-1550 EUVD-2025-7406GHSA-48g7-3x6r-xfhpPYSEC-2025-122

Arbitrary Code Execution via Crafted Keras Config for Model Loading

Published Mar 11, 2025 · Updated Jul 24, 2025 · Assigned by Google

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

VendorProductAffectedFixed
Google Keras 3.0.0 – < 3.8.0 3.8.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 keras 3.3.3-2 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling kubeflow-pipelines-visualization-server 2.4.1-r2 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI keras >= 3.0.0, < 3.9.0 3.9.0 GHSA-48g7-3x6r-xfhp
PyPI keras >= 3.0.0, < 3.8.0 3.8.0 PYSEC-2025-122

References