CVE-2025-8747 json
Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
published last yr. modified last mo. also EUVD-2025-24127 , GHSA-c9rc-mg46-23w3 , PYSEC-2025-75
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 2%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi keras 3.11.0
- keras keras 3.11.0
- github.com/keras-team/keras@713172a commit
- github.com/keras-team/keras#21429 pull request
Is CVE-2025-8747 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.12% chance of exploitation in the next 30 days, higher than 2% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- jfrog.com https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.6 | 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 |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.6 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:Y/R:A/V:X/RE:X/U:X |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | keras | >=3.0.0, <3.11.0 |
3.11.0 |
Affected products
- Google Keras
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/keras-team/keras/pull/21429
patch, web, issue-tracking, report
-
github.com
/keras-team/keras/commit/713172ab56b864e59e2aa79b1a51b0e728bba858
web
-
jfrog.com
/blog/keras-safe_mode-bypass-vulnerability/
third-party-advisory, exploit, advisory
-
github.com
/keras-team/keras/security/advisories/GHSA-c9rc-mg46-23w3
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-8747
advisory
-
github.com
/keras-team/keras
package
-
github.com
/pypa/advisory-database/tree/main/vulns/keras/PYSEC-2025-75.yaml
web
-
jfrog.com
/blog/keras-safe_mode-bypass-vulnerability
web
-
github.com
/advisories/GHSA-c9rc-mg46-23w3
advisory
Sources
- CVE List CVE-2025-8747
- GitHub Advisory GHSA-c9rc-mg46-23w3
- NVD CVE-2025-8747
- OSV PYSEC-2025-75
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.