Inside CVE-2025-1550: Remote Code Execution via Keras Models
A malformed .keras model file could execute arbitrary code when loaded, because the model loading process did not safely handle certain inputs. An attacker could achieve remote code execution by tricking a victim into loading such a model.
Published on blog.huntr.com
Before Google even filed CVE-2025-1550, one of our Huntr researchers, Mevlüt Akçam (aka mvlttt on huntr), quietly unearthed a critical flaw that delivers arbitrary code execution the moment you load a malformed .keras model—or, astonishingly, even a JSON file. In the post below, they’ll walk you step-by-step through…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Victim loads a malicious .keras model
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A .keras file is a saved machine learning model. Normally, loading a model should only read data, but here a crafted file could run harmful code on the victim's computer. This means opening an untrusted model file could let an attacker take control of the system.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.