CVE-2025-49655 Details
Description
Deserialization of untrusted data can occur in versions of the Keras framework running versions 3.11.0 up to but not including 3.11.3, enabling a maliciously uploaded Keras file containing a TorchModuleWrapper class to run arbitrary code on an end user’s system when loaded despite safe mode being enabled. The vulnerability can be triggered through both local and remote files.
A vulnerability allowing arbitrary code execution exists in the Keras framework, specifically in versions 3.11.0 prior to 3.11.3. The issue arises in the TorchModuleWrapper class, where the from_config method deserializes model data using torch.load() with the weights_only parameter set to False. This configuration causes Torch to rely on Python's pickle module for deserialization, which is inherently unsafe and can execute arbitrary code. A maliciously crafted Keras model file could exploit this behavior, executing unauthorized commands on the user's system when the model is loaded, even with safe mode enabled. The vulnerability can be triggered with both local and remote files.
Users can upgrade to Keras version 3.11.3, which disables the unsafe deserialization in the TorchModuleWrapper class when safe mode is enabled.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 17, 2025CISA-ADP
Assessed Oct 17, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/keras-team/keras/pull/21575 | HiddenLayer | Issue TrackingVendor |
| https://hiddenlayer.com/sai_security_advisor/2025-10-keras/ | HiddenLayer | AdvisoryExploitRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | HiddenLayer |
Affected Products
| Product | Versions |
|---|---|
| Keras | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | HiddenLayer |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 17, 2025 | New CVE Received | HiddenLayer |
Volerion