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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Keras | 3.0.0 – ≤ 3.10.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | keras | No fix yet | — |
| Ubuntu 18.04 LTS | keras | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | keras | 3.3.3-3 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | keras | >= 3.0.0, < 3.11.0 | 3.11.0 | GHSA-c9rc-mg46-23w3 |
| PyPI | keras | — | — | PYSEC-2025-75 |
References
- https://github.com/keras-team/keras/pull/21429 patch
- https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/ third-party-advisory