CVE-2025-1550 – keras
Package
Manager: pip
Name: keras
Vulnerable Version: >=3.0.0 <3.9.0
Severity
Level: High
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N/E:H/RL:U/RC:C
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
EPSS: 0.0026 pctl0.49162
Details
Arbitrary Code Execution via Crafted Keras Config for Model Loading ### 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 - https://www.cve.org/cverecord?id=CVE-2025-1550 - https://github.com/keras-team/keras/pull/20751
Metadata
Created: 2025-03-11T20:07:32Z
Modified: 2025-03-11T20:07:32Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-48g7-3x6r-xfhp/GHSA-48g7-3x6r-xfhp.json
CWE IDs: ["CWE-94"]
Alternative ID: GHSA-48g7-3x6r-xfhp
Finding: F422
Auto approve: 1