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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

EPSS 0.01% · P0
Get alerts for future matching vulnerabilitiesLog 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: NVD (National Vulnerability Database)
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: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
动态管理代码资源的控制不恰当
Source: NVD (National Vulnerability Database)
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

VendorProductAffected VersionsCPESubscribe
Keras-teamKeras 3.0.0 ~ 3.11.2 -

II. Public POCs for CVE-2025-9905

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

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