CVE-2025-8747 Details
Description
A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attacker to achieve arbitrary code execution by convincing a user to load a specially crafted `.keras` model archive.
A vulnerability has been identified in Keras versions 3.0.0 through 3.10.0, allowing for arbitrary code execution by bypassing the 'safe mode' feature. This issue arises in the 'Model.load_model' method, where an attacker can persuade a user to load a malicious '.keras' model archive. The vulnerability exploits the deserialization of Lambda layers, which can contain embedded Python code, and takes advantage of Keras's Functional API to execute arbitrary functions available on the victim's machine.
Users can update to Keras version 3.10.1 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 15, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/ | CISA-ADP | Third Party Advisory |
| https://github.com/keras-team/keras/pull/21429 | [email protected] | Issue Tracking |
| https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/ | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| keras keras | >= 3.0.0, <= 3.10.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 14, 2025 | Initial Analysis | [email protected] |
| Aug 11, 2025 | CVE Modified | CISA-ADP |
| Aug 11, 2025 | New CVE Received | [email protected] |