Keras-team keras-team/keras
Safe Mode Bypass in keras-team/keras
A vulnerability in the `TFSMLayer` class of the `keras` package, version 3.13.0, allows attacker-controlled TensorFlow SavedModels to be loaded during deserialization of `.keras` models, even when `safe_mode=True`. This bypasses the security guarantees of `safe_mode` and enables arbitrary attacker-controlled code execution during model inference under the victim's privileges. The issue arises due to the unconditional loading of external SavedModels, serialization of attacker-controlled file paths, and the lack of validation in the `from_config()` method.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by CNA · CWE-502
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
keras-team keras-team/keras
- >= unspecified, < 3.13.2
Fixed in 3.13.2
Mitigation
Upgrade keras-team/keras to 3.13.2 or later.
References
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.