- What is CWE-502?
- The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- What CVEs are caused by CWE-502?
- 2,409 recorded CVEs are attributed to CWE-502, including CVE-2025-26399, CVE-2025-53690, CVE-2025-24813. 70 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- How do you prevent CWE-502?
- 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.
- How is CWE-502 detected?
- 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.)
- What are the consequences of CWE-502?
- Exploiting CWE-502 can lead to: Modify Application Data, Unexpected State, DoS: Resource Consumption (CPU), Varies by Context.
- Is CWE-502 actively exploited?
- Yes. 70 CWE-502 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 2,409 recorded CVEs.