CVE-2025-9905 allows arbitrary code execution in Keras's Model.load_model method, even with safe_mode=True, by loading a specially crafted .h5/.hdf5 model archive. This vulnerability, affecting Keras, stems from the Lambda layer feature which permits pickled Python code, bypassing safe_mode protection. Rated 7.3 HIGH (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H), it requires local access and user interaction but can lead to high confidentiality, integrity, and availability impacts. Currently, there is no evidence of active exploitation, public exploit code, or significant community discussion.
| Vendor | Product | Version(s) | CPE |
|---|---|---|---|
>= 3.0.0, < 3.11.3CPE matchmatch criteria | cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:* |
CVSS version used by this source: 4.0
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
The average CVE in this peer group has 0.0 Twitter, 0.1 Reddit, 0.1 Bluesky, 0.0 Mastodon, and 0.1 GitHub mentions.
No media coverage found for this CVE.
The average CVE in this peer group has 0.2 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.
The Keras `Model.load_model` method **silently** ignores `safe_mode=True` and allows arbitrary code execution when a `.h5`/`.hdf5` file is loaded.
Sep 19, 2025keras: Arbitary Code execution in Keras load_model()
Sep 19, 2025Arbitary Code execution in Keras load_model()
Sep 9, 2025