Weakness · Critical
CWE-502: Deserialization of Untrusted Data
What it is
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- Severity (our rating)
- Critical
- Likelihood of exploit
- Medium
- Introduced during
- Architecture and Design, Implementation
- Exploited in the wild
- 71 known exploited CVEs
What an attacker can do
- Modify Application Data (Integrity)
- Unexpected State (Integrity)
- DoS: Resource Consumption (CPU) (Availability)
- Varies by Context (Other)
How to prevent it
Architecture and Design
- 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.
- 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.
- 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.
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.
- Explicitly define a final object() to prevent deserialization.
- 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.
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.
While the code is being fixed, a WAF in blocking mode stops Java deserialization payloads at the edge.
How to find it
- Automated Static Analysis. Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Exploited in the wild: 71 CVEs
Vulnerabilities caused by CWE-502 that attackers have used, from CISA's Known Exploited Vulnerabilities catalog, newest first.
- CVE-2021-23758Ajax.NET Professional Deserialization of Untrusted Data Vulnerability · added August 26, 2026
- CVE-2026-63077 ransomwareJetBrains TeamCity Deserialization of Untrusted Data Vulnerability · added August 5, 2026
- CVE-2026-50522Microsoft SharePoint Deserialization of Untrusted Data Vulnerability · added July 22, 2026
- CVE-2026-58644Microsoft SharePoint Deserialization of Untrusted Data Vulnerability · added July 16, 2026
- CVE-2026-45659 ransomwareMicrosoft SharePoint Server Deserialization of Untrusted Data Vulnerability · added July 1, 2026
- CVE-2026-12569 ransomwarePTC Windchill and FlexPLM Improper Input Validation Vulnerability · added June 25, 2026
- CVE-2026-45247Mirasvit Full Page Cache Warmer Deserialization of Untrusted Data Vulnerability · added June 3, 2026
- CVE-2023-21529 ransomwareMicrosoft Exchange Server Deserialization of Untrusted Data Vulnerability · added April 13, 2026
- CVE-2026-20131 ransomwareCisco Secure Firewall Management Center (FMC) Software and Cisco Security Cloud Control (SCC) Firewall Management Deserialization of Untrusted Data Vulnerability · added March 19, 2026
- CVE-2026-20963Microsoft SharePoint Deserialization of Untrusted Data Vulnerability · added March 18, 2026
- CVE-2025-26399 ransomwareSolarWinds Web Help Desk Deserialization of Untrusted Data Vulnerability · added March 9, 2026
- CVE-2025-49113RoundCube Webmail Deserialization of Untrusted Data Vulnerability · added February 20, 2026
- CVE-2025-40551SolarWinds Web Help Desk Deserialization of Untrusted Data Vulnerability · added February 3, 2026
- CVE-2025-59287Microsoft Windows Server Update Service (WSUS) Deserialization of Untrusted Data Vulnerability · added October 24, 2025
- CVE-2025-10035 ransomwareFortra GoAnywhere MFT Deserialization of Untrusted Data Vulnerability · added September 29, 2025
- CVE-2025-5086Dassault Systèmes DELMIA Apriso Deserialization of Untrusted Data Vulnerability · added September 11, 2025
- CVE-2025-53690Sitecore Multiple Products Deserialization of Untrusted Data Vulnerability · added September 4, 2025
- CVE-2024-8069Citrix Session Recording Deserialization of Untrusted Data Vulnerability · added August 25, 2025
- CVE-2025-53770 ransomwareMicrosoft SharePoint Deserialization of Untrusted Data Vulnerability · added July 20, 2025
- CVE-2025-24016Wazuh Server Deserialization of Untrusted Data Vulnerability · added June 10, 2025
- CVE-2025-42999 ransomwareSAP NetWeaver Deserialization Vulnerability · added May 15, 2025
- CVE-2025-24813Apache Tomcat Path Equivalence Vulnerability · added April 1, 2025
- CVE-2019-9875Sitecore CMS and Experience Platform (XP) Deserialization Vulnerability · added March 26, 2025
- CVE-2019-9874Sitecore CMS and Experience Platform (XP) Deserialization Vulnerability · added March 26, 2025
- CVE-2024-20953Oracle Agile Product Lifecycle Management (PLM) Deserialization Vulnerability · added February 24, 2025
- CVE-2017-3066Adobe ColdFusion Deserialization Vulnerability · added February 24, 2025
- CVE-2025-0994Trimble Cityworks Deserialization Vulnerability · added February 7, 2025
- CVE-2025-23006 ransomwareSonicWall SMA1000 Appliances Deserialization Vulnerability · added January 24, 2025
- CVE-2024-38094 ransomwareMicrosoft SharePoint Deserialization Vulnerability · added October 22, 2024
- CVE-2024-40711 ransomwareVeeam Backup and Replication Deserialization Vulnerability · added October 17, 2024
- CVE-2019-0344SAP Commerce Cloud Deserialization of Untrusted Data Vulnerability · added September 30, 2024
- CVE-2022-21445Oracle ADF Faces Deserialization of Untrusted Data Vulnerability · added September 18, 2024
- CVE-2020-0618 ransomwareMicrosoft SQL Server Reporting Services Remote Code Execution Vulnerability · added September 18, 2024
- CVE-2024-28986SolarWinds Web Help Desk Deserialization of Untrusted Data Vulnerability · added August 15, 2024
- CVE-2018-0824Microsoft COM for Windows Deserialization of Untrusted Data Vulnerability · added August 5, 2024
- CVE-2023-43208 ransomwareNextGen Healthcare Mirth Connect Deserialization of Untrusted Data Vulnerability · added May 20, 2024
- CVE-2018-15133Laravel Deserialization of Untrusted Data Vulnerability · added January 16, 2024
- CVE-2023-38203 ransomwareAdobe ColdFusion Deserialization of Untrusted Data Vulnerability · added January 8, 2024
- CVE-2023-29300 ransomwareAdobe ColdFusion Deserialization of Untrusted Data Vulnerability · added January 8, 2024
- CVE-2023-46604 ransomwareApache ActiveMQ Deserialization of Untrusted Data Vulnerability · added November 2, 2023
- CVE-2023-40044 ransomwareProgress WS_FTP Server Deserialization of Untrusted Data Vulnerability · added October 5, 2023
- CVE-2023-26359Adobe ColdFusion Deserialization of Untrusted Data Vulnerability · added August 21, 2023
- CVE-2022-31199 ransomwareNetwrix Auditor Insecure Object Deserialization Vulnerability · added July 11, 2023
- CVE-2021-39144XStream Remote Code Execution Vulnerability · added March 10, 2023
- CVE-2020-5741Plex Media Server Remote Code Execution Vulnerability · added March 10, 2023
- CVE-2022-47986 ransomwareIBM Aspera Faspex Code Execution Vulnerability · added February 21, 2023
- CVE-2023-0669 ransomwareFortra GoAnywhere MFT Remote Code Execution Vulnerability · added February 10, 2023
- CVE-2021-35587Oracle Fusion Middleware Unspecified Vulnerability · added November 28, 2022
- CVE-2022-41082 ransomwareMicrosoft Exchange Server Remote Code Execution Vulnerability · added September 30, 2022
- CVE-2022-35405Zoho ManageEngine Multiple Products Remote Code Execution Vulnerability · added September 22, 2022
- CVE-2018-2628Oracle WebLogic Server Unspecified Vulnerability · added September 8, 2022
- CVE-2021-31010Apple iOS, macOS, watchOS Sandbox Bypass Vulnerability · added August 25, 2022
- CVE-2019-15271Cisco RV Series Routers Deserialization of Untrusted Data Vulnerability · added June 8, 2022
- CVE-2021-27852Checkbox Survey Deserialization of Untrusted Data Vulnerability · added April 11, 2022
- CVE-2021-42237 ransomwareSitecore XP Remote Command Execution Vulnerability · added March 25, 2022
- CVE-2019-10068Kentico Xperience Deserialization of Untrusted Data Vulnerability · added March 25, 2022
- CVE-2019-6340Drupal Core Remote Code Execution Vulnerability · added March 25, 2022
- CVE-2018-1000861Jenkins Stapler Web Framework Deserialization of Untrusted Data Vulnerability · added February 10, 2022
- CVE-2021-44228 ransomwareApache Log4j2 Remote Code Execution Vulnerability · added December 10, 2021
- CVE-2017-12149 ransomwareRed Hat JBoss Application Server Remote Code Execution Vulnerability · added December 10, 2021
- CVE-2021-42321 ransomwareMicrosoft Exchange Server Remote Code Execution Vulnerability · added November 17, 2021
- CVE-2021-35464 ransomwareForgeRock Access Management (AM) Core Server Remote Code Execution Vulnerability · added November 3, 2021
- CVE-2021-26857 ransomwareMicrosoft Exchange Server Remote Code Execution Vulnerability · added November 3, 2021
- CVE-2020-17144Microsoft Exchange Server Remote Code Execution Vulnerability · added November 3, 2021
- CVE-2020-10189Zoho ManageEngine Desktop Central File Upload Vulnerability · added November 3, 2021
- CVE-2020-7961Liferay Portal Deserialization of Untrusted Data Vulnerability · added November 3, 2021
- CVE-2020-2555Oracle Multiple Products Remote Code Execution Vulnerability · added November 3, 2021
- CVE-2019-18935 ransomwareProgress Telerik UI for ASP.NET AJAX Deserialization of Untrusted Data Vulnerability · added November 3, 2021
- CVE-2018-4939Adobe ColdFusion Deserialization of Untrusted Data Vulnerability · added November 3, 2021
- CVE-2017-9805Apache Struts Deserialization of Untrusted Data Vulnerability · added November 3, 2021
- CVE-2015-4852Oracle WebLogic Server Deserialization of Untrusted Data Vulnerability · added November 3, 2021
The Dome
Block it at the edge while you fix it
The Dome's WAF runs the OWASP Core Rule Set in blocking mode and stops Java deserialization payloads before they reach your application.
See the DomeT Academy
Stop writing it in the first place
Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.
Start freeSource: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.