CWE-502: Deserialization of Untrusted Data

moderate-risk

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Abstraction: Base

Common Consequences

Integrity Modify Application Data
Availability DoS: Resource Consumption (CPU)
Other Varies by Context

Detection Methods

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.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2017-1000353 9.8 94.5% Y
CVE-2017-1000353 9.8 94.5% Y
CVE-2018-1000861 9.8 94.5% Y
CVE-2018-1000861 9.8 94.5% Y
CVE-2019-6340 8.1 94.4% Y
CVE-2019-6340 8.1 94.4% Y
CVE-2023-40044 10.0 94.4% Y
CVE-2023-46604 10.0 94.4% Y
CVE-2023-40044 10.0 94.4% Y
CVE-2018-2628 9.8 94.4% Y
34
/ 100
moderate-risk
Active Threat 30/50 · High
Exploit Availability 4/50 · Minimal