CVE-2025-49655: Keras Keras Framework Vulnerable To Deserialization Vulnerability
CRITICALCVE-2025-49655 is a CRITICAL (CVSS 9.8) keras framework vulnerable to deserialization vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Keras libraries in the PyPI ecosystem. The issue involves keras framework vulnerable to deserialization of untrusted data. Remediation is available by upgrading affected packages to version 3.11.3.
CVE-2025-49655 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-49655
To remediate this vulnerability, upgrade all affected Keras dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install keras>=3.11.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show keras
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-49655, inspect your installed packages using pip:
pip show keras
Analyze the terminal output to locate any version of Keras in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.3), your application is affected.
Note: The pip show keras command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Keras, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-49655 Affected Keras Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
keras
|
PyPI |
≥ 3.11.0
< 3.11.3
|
3.11.3
|
References
Frequently Asked Questions
What is CVE-2025-49655?
Which Keras versions are affected?
What version fixes CVE-2025-49655?
Is keras affected?
What is the CVSS score of CVE-2025-49655?
What CWE is associated with CVE-2025-49655?
How can I check PyPI dependencies for CVE-2025-49655?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cvhh-q5g5-qprp",
"modified" : "2025-10-17T20:18:10Z",
"published" : "2025-10-17T18:31:07Z",
"aliases" : [ "CVE-2025-49655" ],
"summary" : "Keras framework vulnerable to deserialization of untrusted data",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "keras"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.11.0"
}, {
"fixed" : "3.11.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-49655"
}, {
"type" : "WEB",
"url" : "https://github.com/keras-team/keras/pull/21575"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/keras-team/keras"
}, {
"type" : "WEB",
"url" : "https://hiddenlayer.com/sai_security_advisor/2025-10-keras"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-17T20:18:10Z",
"nvd_published_at" : "2025-10-17T16:15:37Z"
}
}