CWE-502: Deserialization of Untrusted Data
3515 CVEs have CWE-502 as their primary weakness. 70 of them are in the CISA KEV catalog. The highest EPSS score among them is 99.999%.
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
Child of CWE-913: Improper Control of Dynamically-Managed Code Resources
Mitigations
- Architecture and Design Implementation: If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- Implementation: When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
- Implementation: Explicitly define a final object() to prevent deserialization.
- Architecture and Design Implementation: Make fields transient to protect them from deserialization. An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.
- Implementation: Avoid having unnecessary types or gadgets (a sequence of instances and method invocations that can self-execute during the deserialization process, often found in libraries) available that can be leveraged for malicious ends. This limits the potential for unintended or unauthorized types and gadgets to be leveraged by the attacker. Add only acceptable classes to an allowlist. Note: new gadgets are constantly being discovered, so this alone is not a sufficient mitigation.
- Architecture and Design Implementation: Employ cryptography of the data or code for protection. However, it's important to note that it would still be client-side security. This is risky because if the client is compromised then the security implemented on the client (the cryptography) can be bypassed.
- Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Observed examples
- CVE-2024-37052: insecure deserialization in platform for managing AI/ML applications and models allows code execution via a crafted pickled object in a model file
- CVE-2024-37288: deserialization of untrusted YAML data in dashboard for data query and visualization of Elasticsearch data
- CVE-2024-9314: PHP object injection in WordPress plugin for AI-based SEO
- CVE-2019-12799: Chain: bypass of untrusted deserialization issue (CWE-502) by using an assumed-trusted class (CWE-183)
- CVE-2015-8103: Deserialization issue in commonly-used Java library allows remote execution.
- CVE-2015-4852: Deserialization issue in commonly-used Java library allows remote execution.
- CVE-2013-1465: Use of PHP unserialize function on untrusted input allows attacker to modify application configuration.
- CVE-2012-3527: Use of PHP unserialize function on untrusted input in content management system might allow code execution.
- CVE-2012-0911: PHP-based content management system written in PHP uses unserialize function on untrusted input to generate arbitrary objects, possibly allowing code execution.
- CVE-2011-2520: Python script allows local users to execute code via pickled data.
- CVE-2012-4406: Unsafe deserialization using pickle in a Python script.
- CVE-2003-0791: Web browser allows execution of native methods via a crafted string to a JavaScript function that deserializes the string.
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2021-44228 | 2021-12-10 | CRITICAL | 10.0 | 99.999% | Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and… |
| CVE-2025-53770 | 2025-07-20 | CRITICAL | 9.8 | 99.999% | Deserialization of untrusted data in on-premises Microsoft SharePoint Server allows an unauthorized attacker to execute code over a network. Microsoft is aware… |
| CVE-2021-35464 | 2021-07-22 | CRITICAL | 9.8 | 99.999% | ForgeRock AM server before 7.0 has a Java deserialization vulnerability in the jato.pageSession parameter on multiple pages. The exploitation does not require… |
| CVE-2023-0669 | 2023-02-06 | HIGH | 7.2 | 99.999% | Fortra (formerly, HelpSystems) GoAnywhere MFT suffers from a pre-authentication command injection vulnerability in the License Response Servlet due to… |
| CVE-2023-46604 | 2023-10-27 | CRITICAL | 10.0 | 99.992% | The Java OpenWire protocol marshaller is vulnerable to Remote Code Execution. This vulnerability may allow a remote attacker with network access to either a… |
| CVE-2023-29300 | 2023-07-12 | CRITICAL | 9.8 | 99.991% | Adobe ColdFusion versions 2018u16 (and earlier), 2021u6 (and earlier) and 2023.0.0.330468 (and earlier) are affected by a Deserialization of Untrusted Data… |
| CVE-2025-59287 | 2025-10-14 | CRITICAL | 9.8 | 99.980% | Deserialization of untrusted data in Windows Server Update Service allows an unauthorized attacker to execute code over a network. |
| CVE-2022-41082 | 2022-10-03 | HIGH | 8.0 | 99.970% | Microsoft Exchange Server Remote Code Execution Vulnerability |
| CVE-2022-47986 | 2023-02-17 | CRITICAL | 9.8 | 99.965% | IBM Aspera Faspex 4.4.2 Patch Level 1 and earlier could allow a remote attacker to execute arbitrary code on the system, caused by a YAML deserialization flaw.… |
| CVE-2018-2628 | 2018-04-19 | CRITICAL | 9.8 | 99.958% | Vulnerability in the Oracle WebLogic Server component of Oracle Fusion Middleware (subcomponent: WLS Core Components). Supported versions that are affected are… |
| CVE-2020-10189 | 2020-03-06 | CRITICAL | 9.8 | 99.941% | Zoho ManageEngine Desktop Central before 10.0.474 allows remote code execution because of deserialization of untrusted data in getChartImage in the FileStorage… |
| CVE-2020-7961 | 2020-03-20 | CRITICAL | 9.8 | 99.905% | Deserialization of Untrusted Data in Liferay Portal prior to 7.2.1 CE GA2 allows remote attackers to execute arbitrary code via JSON web services (JSONWS). |
| CVE-2023-21839 | 2023-01-17 | HIGH | 7.5 | 99.900% | Vulnerability in the Oracle WebLogic Server product of Oracle Fusion Middleware (component: Core). Supported versions that are affected are 12.2.1.3.0… |
| CVE-2022-35405 | 2022-07-19 | CRITICAL | 9.8 | 99.873% | Zoho ManageEngine Password Manager Pro before 12101 and PAM360 before 5510 are vulnerable to unauthenticated remote code execution. (This also affects… |
| CVE-2019-18935 | 2019-12-11 | CRITICAL | 9.8 | 99.737% | Progress Telerik UI for ASP.NET AJAX through 2019.3.1023 contains a .NET deserialization vulnerability in the RadAsyncUpload function. This is exploitable when… |
| CVE-2025-55182 | 2025-12-03 | CRITICAL | 10.0 | 99.731% | A pre-authentication remote code execution vulnerability exists in React Server Components versions 19.0.0, 19.1.0, 19.1.1, and 19.2.0 including the following… |
| CVE-2017-1000353 | 2018-01-29 | CRITICAL | 9.8 | 99.679% | Jenkins versions 2.56 and earlier as well as 2.46.1 LTS and earlier are vulnerable to an unauthenticated remote code execution. An unauthenticated remote code… |
| CVE-2025-49113 | 2025-06-02 | CRITICAL | 9.9 | 99.604% | Roundcube Webmail before 1.5.10 and 1.6.x before 1.6.11 allows remote code execution by authenticated users because the _from parameter in a URL is not… |
| CVE-2017-9805 | 2017-09-15 | HIGH | 8.1 | 99.396% | The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for… |
| CVE-2020-0618 | 2020-02-11 | HIGH | 8.8 | 99.046% | A remote code execution vulnerability exists in Microsoft SQL Server Reporting Services when it incorrectly handles page requests, aka 'Microsoft SQL Server… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-502'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-502'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).