keras is vulnerable to Unsafe Deserialization
78
High Risk
TorchModuleWrapper.from_config restores a base64-encoded torch.nn.Module with torch.load(..., weights_only=False). Its safe-mode check only blocked when ambient in_safe_mode() was truthy, so a direct from_config call—or any path where the deserialization scope is unset—still unpickled attacker-controlled data and could execute arbitrary code. The fix treats an unset safe mode as safe and refuses the load unless safe_mode is explicitly disabled.
You are affected if you are using a version that falls within the vulnerable range and you deserialize TorchModuleWrapper configs or models that contain them from untrusted sources.
keras is vulnerable to Unsafe Deserialization in versions 3.11.3 - 3.14.1.
Upgrade the keras library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant