Google Keras
Arbitrary Code Execution via Crafted Keras Config for Model Loading
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3.0.0, < 3.8.0
Fixed in 3.8.0
Timeline
Days relative to CVE publicationFirst public PoC 127 days after publication; not in CISA KEV. First PoC: Keras 2.15 - Remote Code Execution (RCE) (Exploit-DB, 16 Jul 2025).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| ChCh0i/cve-2025-1550 | 24 Oct 2025 +227 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Exploit-DB | Keras 2.15 - Remote Code Execution (RCE) | 16 Jul 2025 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /upload
- Body markers
"module": "subprocess""config":"Popen""class_name":"function"file=@model.kerasinmultipart/form-data- Ports
- 5000
- Seen in
- 1 repo: ChCh0i/cve-2025-1550
- Evidence
- ChCh0i/cve-2025-1550/app.py:20 ChCh0i/cve-2025-1550/exploit.py:50
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/upload(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [5000] (msg:"GG PoC-Monitor CVE-2025-1550 Google Keras exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/upload"; http.request_body; content:"|22|module|22|: |22|subprocess|22|"; http.request_body; content:"|22|config|22|:|22|Popen|22|"; http.request_body; content:"|22|class_name|22|:|22|function|22|"; http.request_body; content:"file=@model.keras"; reference:url,poc.griffinguard.io/cve/CVE-2025-1550; classtype:web-application-attack; sid:9011127; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Google Keras exploit attempt (CVE-2025-1550)
id: gg-pocmon-cve-2025-1550-9011127
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-1550. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-1550
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/upload'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.1550