High severity · published Aug 11, 2025
CVE-2025-8747
Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
7.8
CVSS
0.1%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.1% · higher than 2% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Keras · Google
3.0.0 through 3.10.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-8747
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-8747
Issue Tracking
https://github.com/keras-team/keras/pull/21429
Third Party Advisory
https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/
More from Keras
9.8
CVE-2025-1550
Arbitrary Code Execution via Crafted Keras Config for Model Loading
7.5
CVE-2026-1669
Arbitrary File Read in Keras via HDF5 External Datasets
7.5
CVE-2026-0897
Denial of Service in Keras via Excessive Memory Allocation in HDF5 Metadata
