What is CWE-502?
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
CWE-502 is a base-level weakness in MITRE’s Common Weakness Enumeration, with a MITRE likelihood of exploit of Medium. Applicable platforms: Language: Java; Language: Ruby; Language: PHP; Language: Python; Language: JavaScript; Technology: Not Technology-Specific.
Source: MITRE CWE (CWE-502 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data.
Consequences
- Integrity — Modify Application Data, Unexpected State. Attackers can modify unexpected objects or data that was assumed to be safe from modification. Deserialized data or code could be modified without using the provided accessor functions, or unexpected functions could be invoked.
- Availability — DoS: Resource Consumption (CPU). If a function is making an assumption on when to terminate, based on a sentry in a string, it could easily never terminate.
- Other — Varies by Context. The consequences can vary widely, because it depends on which objects or methods are being deserialized, and how they are used. Making an assumption that the code in the deserialized object is valid is dangerous and can enable exploitation. One example is attackers using gadget chains to perform unauthorized actions, such as generating a shell.
Source: MITRE CWE, common consequences.
How CWE-502 is exploited in the wild
Threadlinqs maps 113 CVEs to CWE-502, published between 2019-08-14 and 2026-10-31. 31 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild, and 17 are tied to ransomware campaigns. By CVSS v3 severity the set splits into 61 critical, 34 high, 7 medium, 1 low. The highest EPSS score in the set is 99.9% (CVE-2023-0669), the modelled probability of exploitation in the next 30 days. 219 tracked threats reference CWE-502 directly or through a CVE it covers; the most recent is “BO Team (Black Owl) Supply Chain Attack Against a Software Developer's Infrastructure (CVE-2021-44228)” (2026-11-07). Affected products concentrate in Microsoft (20), Solarwinds (8), Oracle Corporation (6), among 53 vendors in total.
Vulnerabilities (CVEs)
Showing 40 of 113 CVEs mapped to CWE-502, CISA KEV first, then by CVSS score.
- CVE-2021-44228 — CISA KEV · CVSS 10 critical · EPSS 99.9% · published 2021-12-10
- CVE-2023-46604 — CISA KEV · CVSS 10 critical · EPSS 99.8% · published 2023-10-27
- CVE-2025-55182 — CISA KEV · CVSS 10 critical · EPSS 99.8% · published 2025-12-03
- CVE-2025-10035 — CISA KEV · CVSS 10 critical · EPSS 99.7% · published 2025-09-18
- CVE-2026-20131 — CISA KEV · CVSS 10 critical · EPSS 43.1% · published 2026-03-04
- CVE-2025-49113 — CISA KEV · CVSS 9.9 critical · EPSS 98.9% · published 2025-06-02
- CVE-2021-35464 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2021-07-22
- CVE-2025-53770 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2025-07-20
- CVE-2025-59287 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2025-10-14
- CVE-2020-10189 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2020-03-06
- CVE-2019-18935 — CISA KEV · CVSS 9.8 critical · EPSS 99.7% · published 2019-12-11
- CVE-2024-40711 — CISA KEV · CVSS 9.8 critical · EPSS 90.3% · published 2024-09-07
- CVE-2025-26399 — CISA KEV · CVSS 9.8 critical · EPSS 89.5% · published 2025-09-23
- CVE-2024-28986 — CISA KEV · CVSS 9.8 critical · EPSS 84.6% · published 2024-08-13
- CVE-2025-40551 — CISA KEV · CVSS 9.8 critical · EPSS 84.1% · published 2026-01-28
- CVE-2019-0344 — CISA KEV · CVSS 9.8 critical · EPSS 7.0% · published 2019-08-14
- CVE-2026-45247 — CISA KEV · CVSS 9.8 critical · EPSS 2.0% · published 2026-05-26
- CVE-2026-12569 — CISA KEV · CVSS 9.8 critical · EPSS 1.1% · published 2026-06-18
- CVE-2026-20265 — CISA KEV · CVSS 9.8 critical · EPSS 0.2% · published 2026-06-17
- CVE-2025-42999 — CISA KEV · CVSS 9.1 critical · EPSS 12.7% · published 2025-05-13
- CVE-2025-53690 — CISA KEV · CVSS 9 critical · EPSS 51.0% · published 2025-09-03
- CVE-2023-21529 — CISA KEV · CVSS 8.8 high · EPSS 59.2% · published 2023-02-14
- CVE-2025-0994 — CISA KEV · CVSS 8.8 high · EPSS 31.0% · published 2025-02-06
- CVE-2026-20963 — CISA KEV · CVSS 8.8 high · EPSS 29.2% · published 2026-01-13
- CVE-2026-45659 — CISA KEV · CVSS 8.8 high · EPSS 2.7% · published 2026-05-22
- CVE-2021-23758 — CISA KEV · CVSS 8.1 high · EPSS 82.5% · published 2021-12-03
- CVE-2025-3935 — CISA KEV · CVSS 8.1 high · EPSS 3.5% · published 2025-04-25
- CVE-2022-41082 — CISA KEV · CVSS 8 high · EPSS 99.9% · published 2022-10-03
- CVE-2021-26857 — CISA KEV · CVSS 7.8 high · EPSS 95.7% · published 2021-03-03
- CVE-2023-0669 — CISA KEV · CVSS 7.2 high · EPSS 99.9% · published 2023-02-06
- CVE-2025-8875 — CISA KEV · EPSS 1.8% · published 2025-08-14
- CVE-2026-69836 — CVSS 10 critical · EPSS 1.3% · published 2026-08-20
- CVE-2026-70416 — CVSS 10 critical · EPSS 0.8% · published 2026-09-16
- CVE-2026-82222 — CVSS 10 critical · EPSS 0.4% · published 2026-08-28
- CVE-2026-60366 — CVSS 10 critical · published 2026-07-22
- CVE-2025-23120 — CVSS 9.9 critical · EPSS 24.0% · published 2025-03-20
- CVE-2026-50515 — CVSS 9.9 critical · EPSS 1.6% · published 2026-08-06
- CVE-2026-12650 — CVSS 9.9 critical · EPSS 1.5% · published 2026-09-08
- CVE-2026-87719 — CVSS 9.9 critical · EPSS 0.6% · published 2026-09-12
- CVE-2026-60369 — CVSS 9.9 critical · EPSS 0.4% · published 2026-07-22
Affected vendors
Threat activity
219 tracked threats cite CWE-502; the 25 most recent are listed.
- BO Team (Black Owl) Supply Chain Attack Against a Software Developer's Infrastructure (CVE-2021-44228)HIGH
- October 2026 CVE Landscape: PHP2Shell (CVE-2026-109618/109619) + Fragnesia (CVE-2026-46300) chain, Longlegs/Storm-2603 SharePoint exploitation, and other actively exploited CVEsCRITICAL
- PLAY Ransomware (PlayCrypt) - Reverse Engineering Analysis and Big Game Hunting OperationsHIGH
- Storm-2603 Fileless ToolShell Breach of On-Prem SharePoint (CVE-2025-53770 / CVE-2025-53771) with Warlock/LockBit RansomwareCRITICAL
- Fastjson 1.x Gadget-Free RCE (CVE-2026-16723 / ThreatBook XVE-2026-39684) Under Active ExploitationCRITICAL
- Cloudflare Q3 2026 DDoS Threat Report: 18.2 Million Network-Layer Attacks (+38% QoQ) Driven by Dysphoria, Evooo1Bot and Booter ServicesMEDIUM
- Ransomware Targeting of Backup Infrastructure: Akira/Fog/Frag Exploiting Veeam CVE-2024-40711, Plus CVE-2025-23120 and March 2026 Backup & Replication Flaws (CVE-2026-21666/21667/21708)CRITICAL
- APT and Financial Attacks on Industrial Organizations in Q1 2026 (Kaspersky ICS CERT): Operation Neusploit (CVE-2026-21509/CVE-2026-21513), Poland Energy Wipers, TGR-STA-1030, MuddyWater, LockBit 5.0, Diesel VortexHIGH
- NetamLoader: Unknown APT Targets Government-Customized Windows 10 OS in Asia via Patch My PC-Themed XAML/.NET LoaderHIGH
- Cisco Catalyst SD-WAN Authentication Bypass (CVE-2026-20127) Exploited by UAT-8616 and Tied to Volt Typhoon's 'Silent Train' Network; UAT-11473 KeyDrift/PolyFlame/LittleFilch ToolsetCRITICAL
- Doorway Botnet: Large-Scale IoT and Network Device Compromise Campaign (MikroTik RouterOS CVE-2023-30799, Openfire CVE-2023-32315, ActiveMQ CVE-2023-46604, Jenkins, Cameras, ONUs)HIGH
- Unit 42: Retail Peak Season Cyber Threats - Ransomware/Extortion, DDoS, Digital Skimming, Account Takeover and AI-Assisted Intrusion (CVE-2024-34102, CVE-2021-44228)HIGH
- Volt Typhoon 'Silent Train' Relay Framework Used to Conceal Zero-Day Exploitation (CVE-2026-16812, CVE-2026-20127, CVE-2025-8875, CVE-2025-8876, CVE-2024-39717)CRITICAL
- Oracle E-Business Suite TCF SQLi RCE (CVE-2026-101767) actively exploited and Oracle PeopleSoft SSRF-to-RCE chain (CVE-2026-35273) exploited by ShinyHunters (UNC6240)CRITICAL
- Apache Camel Vulnerabilities Allow Remote Code Execution, Authentication Bypass, and Data Theft (CVE-2026-80352, CVE-2026-80351 and 6 others)CRITICAL
- Long-running JavaScript loader campaign infects 953 online stores (mostly Magento) via PolyShell (CVE-2026-48356) and SessionReaper (CVE-2025-54236)HIGH
- Emperador Ransomware Group Claims 3.9GB Data Theft from AB InBev (Budweiser, Corona Maker) - Unverified $1M Bitcoin ExtortionMEDIUM
- Ransomware Surge in Q3 2026: The Gentlemen Overtakes Qilin as Rival Gangs Compete for Market ShareHIGH
- Multiple vulnerabilities in CGM CLININET healthcare software (CVE-2025-30043 and 10 others)HIGH
- Autonomous AI Agent Sandbox Escape via JFrog Artifactory Zero-Days and Hugging Face Dataset Pipeline Intrusion (OpenAI ExploitGym Incident)HIGH
- Operation Escaneo: MexicanMafia (PanchoVilla) Intrusion Campaign Against Mexican Government Agencies and Latin American Financial InstitutionsHIGH
- CVE-2026-16477: Deserialization of Untrusted Data (CWE-502) in MTW CleanShot X (macOS) leading to code execution via malicious .cleanshot fileMEDIUM
- ThreatsDay Roundup: AI API Key Leaks (OpenCode Console), PingCAP Source Code Theft, Zeabur Breach, NVIDIA AIStore CVE-2026-65162, Signal CVE-2026-113380, Laravel CVE-2026-114509CRITICAL
- Proxyjacking campaign hijacks 143+ edge devices in 34 countries (D-Link, Ubiquiti, SAP) to resell bandwidth via Pawns.app, plus active exploitation of PAN-OS CVE-2026-0322HIGH
- NSFOCUS Monthly APT Insights August 2026: Lazarus MISTPEN/ForestTiger/RelayShell Campaign with CVE-2026-68820, UAC-0099 LUNCHPOKE/BURNYBEAR/MATCHBOIL.V2, CVE-2026-42897 Exchange OWA ExploitationHIGH
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 / Firewall: 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].
Source: MITRE CWE, potential mitigations.
Detection methods (MITRE CWE)
- Automated Static Analysis (effectiveness: High): 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.)
Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher.