Vulnerability · Published Aug 11, 2025 · Assigned by Google
CVE-2025-8747Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
High 8.6
In plain English
A high-severity unsafe deserialization in Keras from Google. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 2% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 4.0)8.6High
Exploit odds (30 days)0.1%top 97.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | keras | 3.11.0 | GHSA-c9rc-mg46-23w3 |
| PyPI | keras | no fix listed | PYSEC-2025-75 |
Affected products (as reported)
Weakness: CWE-502 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/AU:Y/R:A
References
- https://github.com/keras-team/keras/pull/21429 patch
- https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/ third-party-advisory