# CVE-2025-8747: Keras safe\_mode bypass allows arbitrary code execution when loading a malicious model.

- Priority: **Routine**
- Reason: Not severe (CVSS 8.6, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-08-11 · Modified: 2026-02-26
- Aliases: GHSA-c9rc-mg46-23w3, PYSEC-2025-75, UBUNTU-CVE-2025-8747, CGA-mcj6-frx4-rv2h, CGA-vx72-3qc9-h3q5
- Record: https://cvemate.com/vulnerability/CVE-2025-8747 · JSON: https://cvemate.com/vulnerability/CVE-2025-8747/json

## Description

```text
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.
```

## Signals

- CVSS: 8.6 high (v4.0, CVE.org) 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
- EPSS: 0.121%, percentile 2.065%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard tensorflow-cpu-jupyter (Chainguard): \< 2.19.0-r7
- chainguard tensorflow-gpu-jupyter (Chainguard): \< 2.19.0-r6
- ubuntu keras (Ubuntu): All versions (No fix recorded)
- google keras: ≥ 3.0.0, ≤ 3.10.0
- keras keras: ≥ 3.0.0, ≤ 3.10.0
- PyPI keras (PyPI): ≥ 3.0.0, \< 3.11.0

## References

- <https://github.com/keras-team/keras/pull/21429>
- <https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/>
- <https://github.com/keras-team/keras/security/advisories/GHSA-c9rc-mg46-23w3>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-8747>
- <https://github.com/keras-team/keras/commit/713172ab56b864e59e2aa79b1a51b0e728bba858>
- <https://github.com/keras-team/keras>
- <https://github.com/pypa/advisory-database/tree/main/vulns/keras/PYSEC-2025-75.yaml>
- <https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability>
- <https://github.com/advisories/GHSA-c9rc-mg46-23w3>
- <https://ubuntu.com/security/CVE-2025-8747>
- <https://www.cve.org/CVERecord?id=CVE-2025-8747>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/8xxx/CVE-2025-8747.json>

---

Data as of 2026-12-05T02:45:43.730Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
