Skip to content
OpenAdvisories

Weakness (CWE)

CWE-502: Deserialization of Untrusted Data

Base Draft

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

How to prevent it (7 mitigations)
  1. 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.

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

  3. Implementation

    Explicitly define a final object() to prevent deserialization.

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

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

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

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

Source: MITRE CWE-502

3,358 results · Feed

  • Critical 9.0
    CVE-2021-45046 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack

    It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-defaul…

    KEV May 1, 2023
  • High 7.5
    CVE-2021-4104 Public exploit EPSS 81%

    Deserialization of untrusted data in JMSAppender in Apache Log4j 1.2

    JMSAppender in Log4j 1.2 is vulnerable to deserialization of untrusted data when the attacker has write access to the Log4j configuration. The attacker can provide TopicBindingName and TopicConnectionFactoryBindingName configurations causing JMSAppender to pe…

  • Unscored —

    ToTop Link <= 1.7.1 - Unauthenticated PHP Object Injection

    The ToTop Link WordPress plugin through 1.7.1 passes base64 encoded user input to the unserialize() PHP function, which could lead to PHP Object injection if a plugin installed on the blog has a suitable gadget chain.

  • Critical 10.0
    CVE-2021-44228 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Apache Log4j2 JNDI features do not protect against attacker controlled LDAP and other JNDI related endpoints

    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 parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who …

    KEV Dec 10, 2021
  • Unscored —
    CVE-2021-42130 EPSS 62%

    A deserialization of untrusted data vulnerability exists in Ivanti Avalanche before 6.3.3 allows an attacker with acces…

  • Unscored —
    CVE-2021-42127 EPSS 66%

    A deserialization of untrusted data vulnerability exists in Ivanti Avalanche before 6.3.3 using Inforail Service allows…

  • Unscored —
    CVE-2021-42125 EPSS 82%

    An unrestricted file upload vulnerability exists in Ivanti Avalanche before 6.3.3 allows an attacker with access to the…

  • Critical 9.8

    Deserialization of Untrusted Data in topthink/framework

    ThinkPHP v6.0.8 was discovered to contain a deserialization vulnerability via the component League\Flysystem\Cached\Storage\AbstractCache.

  • Critical 9.8

    Deserialization of Untrusted Data in topthink/framework

    ThinkPHP v6.0.8 was discovered to contain a deserialization vulnerability via the component vendor\league\flysystem-cached-adapter\src\Storage\Adapter.php.

  • High 8.1
    CVE-2021-23758 Exploited Public exploit EPSS 83%

    Deserialization of Untrusted Data

    All versions of package ajaxpro.2 are vulnerable to Deserialization of Untrusted Data due to the possibility of deserialization of arbitrary .NET classes, which can be abused to gain remote code execution.

    KEV Aug 26, 2026
  • High 8.8

    Sunnet eHRD - Insecure Deserialization

    Sunnet eHRD e-mail delivery task schedule’s serialization function has inadequate input object validation and restriction, which allows a post-authenticated remote attacker with database access privilege, to execute arbitrary code and control the system or in…

  • Medium 6.5

    Deserialization of Untrusted Data in Spring AMQP

    In Spring AMQP versions 2.2.0 - 2.2.19 and 2.3.0 - 2.3.11, the Spring AMQP Message object, in its toString() method, will create a new String object from the message body, regardless of its size. This can cause an OOM Error with a large message

  • High 8.8

    This vulnerability allows remote attackers to execute arbitrary code on affected installations of Orckestra C1 CMS 6.10…

  • Unscored —

    Deserialization of Untrusted Data

    Deserialization of Untrusted Data vulnerability of Apache ShardingSphere-UI allows an attacker to inject outer link resources. This issue affects Apache ShardingSphere-UI Apache ShardingSphere-UI version 4.1.1 and later versions; Apache ShardingSphere-UI vers…

  • High 7.8

    AzeoTech DAQFactory

    Project files are stored memory objects in the form of binary serialized data that can later be read and deserialized again to instantiate the original objects in memory. Malicious manipulation of these files may allow an attacker to corrupt memory.

  • Critical 9.8
    CVE-2021-42237 Exploited · Ransomware Public exploit Scanner template EPSS 97%

    Sitecore XP 7.5 Initial Release to Sitecore XP 8.2 Update-7 is vulnerable to an insecure deserialization attack where i…

    KEV Mar 25, 2022
  • Medium 6.5

    Deserialization of Untrusted Data in Spring AMQP

    In Spring AMQP versions 2.2.0 - 2.2.18 and 2.3.0 - 2.3.10, the Spring AMQP Message object, in its toString() method, will deserialize a body for a message with content type application/x-java-serialized-object. It is possible to construct a malicious java.uti…

  • High 8.6
    CVE-2021-41078 Public exploit

    Nameko Arbitrary code execution due to YAML deserialization

    Nameko through 2.13.0 can be tricked into performing arbitrary code execution when deserializing the config file.

  • Critical 9.8
    CVE-2021-40865 Public exploit EPSS 64%

    Unsafe Pre-Authentication Deserialization In Workers

    An Unsafe Deserialization vulnerability exists in the worker services of the Apache Storm supervisor server allowing pre-auth Remote Code Execution (RCE). Apache Storm 2.2.x users should upgrade to version 2.2.1 or 2.3.0. Apache Storm 2.1.x users should upgra…

  • High 8.8

    Sassy Social Share 3.3.23 PHP Object Injection

    Version 3.3.23 of the Sassy Social Share WordPress plugin is vulnerable to PHP Object Injection via the wp_ajax_heateor_sss_import_config AJAX action due to deserialization of unvalidated user supplied inputs via the import_config function found in the ~/admi…

  • Critical 9.8

    Adobe Connect Deserialization of Untrusted Data Remote Code Execution

    Adobe Connect version 11.2.3 (and earlier) is affected by a Deserialization of Untrusted Data vulnerability to achieve arbitrary method invocation when AMF messages are deserialized on an Adobe Connect server. An attacker can leverage this to execute remote c…

  • Critical 9.8

    Ops CLI Deserialization of Untrusted Data leads to Abritrary Code Execution

    Ops CLI version 2.0.4 (and earlier) is affected by a Deserialization of Untrusted Data vulnerability to achieve arbitrary code execution when the checkout_repo function is called on a maliciously crafted file. An attacker can leverage this to execute arbitrar…

  • Unscored —

    A vulnerability has been identified in SINEC NMS (All versions < V1.0 SP2 Update 1). The affected system allows to uplo…

  • Medium 6.7

    Code exec via yaml parsing

    Loading specially-crafted yaml with the Kubernetes Java Client library can lead to code execution.

  • High 8.1

    Authentication bypass in Pterodactyl

    Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. A malicious user can modify the contents of a `confirmation_token` input during the two-factor authentication process to reference a cache value not associated with th…

  • Critical 9.1

    CWL Viewer: deserialization of untrusted data can lead to complete takeover by an attacker

    cwlviewer is a web application to view and share Common Workflow Language workflows. Versions prior to 1.3.1 contain a Deserialization of Untrusted Data vulnerability. Commit number f6066f09edb70033a2ce80200e9fa9e70a5c29de (dated 2021-09-30) contains a patch.…

  • Critical 9.8

    Apache ddlutils 1.0 readobject vulnerability

    Apache DB DdlUtils 1.0 included a BinaryObjectsHelper that was intended for use when migrating database data with a SQL data type of BINARY, VARBINARY, LONGVARBINARY, or BLOB between databases using the ddlutils features. The BinaryObjectsHelper class was ins…

  • Critical 9.8

    Remote Code Execution in Halibut

    In Halibut versions prior to 4.4.7 there is a deserialisation vulnerability that could allow remote code execution on systems that already trust each other based on certificate verification.

  • Unscored —

    A vulnerability has been identified in Cerberus DMS V4.0 (All versions), Cerberus DMS V4.1 (All versions), Cerberus DMS…

  • High 8.4

    Deserialization of Untrusted Data in parlai

    parlai is a framework for training and evaluating AI models on a variety of openly available dialogue datasets. In affected versions the package is vulnerable to YAML deserialization attack caused by unsafe loading which leads to Arbitary code execution. This…

  • High 8.4
    CVE-2021-24040 Public exploit EPSS 17%

    Deserialization of Untrusted Data in parlai

    Due to use of unsafe YAML deserialization logic, an attacker with the ability to modify local YAML configuration files could provide malicious input, resulting in remote code execution or similar risks. This issue affects ParlAI prior to v1.1.0.

  • Critical 9.8

    Bypass deserialization checks in Apache Dubbo

    The Dubbo Provider will check the incoming request and the corresponding serialization type of this request meet the configuration set by the server. But there's an exception that the attacker can use to skip the security check (when enabled) and reaching a d…

  • Critical 9.8

    Unsafe deserialization in providers using the Hessian protocol

    In Apache Dubbo, users may choose to use the Hessian protocol. The Hessian protocol is implemented on top of HTTP and passes the body of a POST request directly to a HessianSkeleton: New HessianSkeleton are created without any configuration of the serializati…

  • High 7.5

    Deserialization of Untrusted Data in zmister2016/mrdoc

    mrdoc is vulnerable to Deserialization of Untrusted Data

  • High 8.9
    CVE-2021-35218 EPSS 76%

    Chart Endpoint Deserialization of Untrusted Data Remote Code Execution Vulnerability

    Deserialization of Untrusted Data in the Web Console Chart Endpoint can lead to remote code execution. An unauthorized attacker who has network access to the Orion Patch Manager Web Console could potentially exploit this and compromise the server

  • High 8.9
    CVE-2021-35216 EPSS 81%

    Deserialization of Untrusted Data in Resource Controls Remote Code Execution

    Insecure Deserialization of untrusted data remote code execution vulnerability was discovered in Patch Manager Orion Platform Integration module. An Authenticated Attacker with network access via HTTP can compromise this vulnerability can result in Remote Cod…

  • High 8.9
    CVE-2021-35215 Public exploit EPSS 70%

    ActionPluginBaseView Deserialization of Untrusted Data RCE

    Insecure deserialization leading to Remote Code Execution was detected in the Orion Platform version 2020.2.5. Authentication is required to exploit this vulnerability.

  • High 8.8

    RCE vulnerability in Jenkins Code Coverage API Plugin

    Jenkins Code Coverage API Plugin 1.4.0 and earlier does not apply Jenkins JEP-200 deserialization protection to Java objects it deserializes from disk, resulting in a remote code execution vulnerability.

  • High 8.8

    YAML deserialization can run untrusted code

    Rundeck is an open source automation service with a web console, command line tools and a WebAPI. Prior to version 3.3.14 and version 3.4.3, an authorized user can upload a zip-format plugin with a crafted plugin.yaml, or a crafted aclpolicy yaml file, or upl…

  • Unscored —

    Bold Page Builder < 3.1.6 - PHP Object Injection

    The bt_bb_get_grid AJAX action of the Bold Page Builder WordPress plugin before 3.1.6 passes user input into the unserialize() function without any validation or sanitisation, which could lead to a PHP Object Injection. Even though the plugin did not contain …