Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-9905— Arbitary Code execution in Keras load_model()

Quick assessment

Affected
Keras-team Keras
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Keras是Keras开源的一个多后端深度学习框架。 Keras存在安全漏洞,该漏洞源于未正确强制执行safe_mode选项,可能导致执行任意代码。

AI Predicted 9.8 Difficulty: Easy EPSS 0.22% · P11
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-9905

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Arbitary Code execution in Keras load_model()
Source: CVE Program / CVE List V5
Vulnerability Description
The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. One can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives. Note that the .h5/.hdf5 format is a legacy format supported by Keras 3 for backwards compatibility.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
动态管理代码资源的控制不恰当
Source: CVE Program / CVE List V5
Vulnerability Title
Keras 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Keras是Keras开源的一个多后端深度学习框架。 Keras存在安全漏洞,该漏洞源于未正确强制执行safe_mode选项,可能导致执行任意代码。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Keras-team Keras 3.0.0 ~ 3.11.2 -

II. Public POCs for CVE-2025-9905

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-9905

请登录查看更多情报信息。

IV. Related Vulnerabilities

V. Comments for CVE-2025-9905

No comments yet


Leave a comment