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

412 results · Clear filters · Feed

  • Medium 5.3

    OpenStack Ironic: Crafted JSON String to Certain Endpoints on the API or JSON-RPC Service May Result in Service Crash

    In OpenStack Ironic 32 before 37.0.0, an unauthenticated malicious user could submit a crafted JSON string to some endpoints on the API or JSON-RPC service and effect a service crash.

  • Medium 6.4

    AIOHTTP Vulnerable to Deserialization of Untrusted Data

    AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to version 3.14.0, using ``CookieJar.load()`` with untrusted input may allow arbitrary code execution. Most applications using this function will be doing so with the user's…

  • Medium 5.3

    FoundationAgents MetaGPT schema.py Message.check_instruct_content deserialization

    A weakness has been identified in FoundationAgents MetaGPT up to 0.8.2. This affects the function Message.check_instruct_content of the file metagpt/schema.py. Executing a manipulation of the argument mapping can lead to deserialization. The attack is restric…

  • Medium 6.6

    Jenkins Active Directory Plugin deserializes data from LDAP referrals without validation

    Jenkins Active Directory Plugin 2.41 and earlier deserializes data from LDAP referrals without validation.

  • Medium 6.6

    Jenkins LDAP Plugin deserializes data from LDAP referrals without validation

    Jenkins LDAP Plugin 807.v7d7de30930cf and earlier deserializes data from LDAP referrals without validation.

  • Medium 6.3

    changmingxie tcc-transaction Fastjson AutoType REST API Fastjson.parseObject deserialization

    A flaw has been found in changmingxie tcc-transaction up to 2.1.0. This issue affects the function Fastjson.parseObject of the component Fastjson AutoType REST API. This manipulation causes deserialization. It is possible to initiate the attack remotely. The …

  • Medium 6.3

    NVIDIA TRT-LLM for any platform contains a deserialization vulnerability and unsafe serialized handle. A successful exp…

  • Medium 6.3

    Oinone Pamirs appConfigQuery PamirsParserConfig.java JsonUtils.parseMap deserialization

    A vulnerability was identified in Oinone Pamirs up to 7.2.0. This affects the function JsonUtils.parseMap of the file PamirsParserConfig.java of the component appConfigQuery Interface. Such manipulation leads to deserialization. The attack can be launched rem…

  • Medium 5.3

    WWW::Mechanize::Cached versions before 2.00 for Perl deserialize cached HTTP responses from a world-writable on-disk cache, enabling local response forgery and code execution

    WWW::Mechanize::Cached versions before 2.00 for Perl deserialize cached HTTP responses from a world-writable on-disk cache, enabling local response forgery and code execution. With no explicit cache backend, WWW::Mechanize::Cached constructs a default Cache::…

  • Medium —

    TanStack Start - Server Core: Inbound server-function request deserialization could invoke a sibling client-referenced server function

    ### Summary A type-confusion bug in seroval ≤ 1.5.2 ([upstream advisory](https://github.com/lxsmnsyc/seroval/security/advisories)) allowed a crafted JSON body sent to one TanStack Start server function to trigger invocation of a different client-referenced se…

  • Medium 4.3

    DataHub OIDC REDIRECT_URL Cookie Deserialization Vulnerability

    DataHub is an open-source metadata platform. Prior to 1.5.0.3, The DataHub frontend (datahub-frontend-react) deserializes attacker-controlled Java objects from the REDIRECT_URL HTTP cookie during the OIDC callback flow, with no integrity protection (no HMAC, …

  • Medium 6.5

    Deserialization of Untrusted Data in GitLab

    GitLab has remediated an issue in GitLab EE affecting all versions from 11.9 before 18.9.7, 18.10 before 18.10.6, and 18.11 before 18.11.3 that could have allowed an unauthenticated user to cause denial of service by uploading a specially crafted file due to …

  • Medium 5.1

    Nexus Repository 3 - Improper LDAP Referral Handling

    An authenticated administrator who configures or tests LDAP connectivity in Sonatype Nexus Repository Manager versions 3.0.0 through 3.91.1 may be able to initiate unintended server-side connections when interacting with a malicious LDAP server.

  • Medium 6.3

    MindsDB Pickle pickle.loads deserialization

    A security vulnerability has been detected in MindsDB up to 26.01. Affected is the function pickle.loads of the component Pickle Handler. The manipulation leads to deserialization. The attack is possible to be carried out remotely. The exploit has been disclo…

  • Medium 6.3

    mem0ai mem0 faiss.py pickle.dump deserialization

    A vulnerability was found in mem0ai mem0 up to 1.0.11. This affects the function pickle.load/pickle.dump of the file mem0/vector_stores/faiss.py. Performing a manipulation results in deserialization. It is possible to initiate the attack remotely. The exploit…

  • Medium 6.5

    Jenkins Matrix Authorization Strategy Plugin: Unsafe deserialization allows invocation of parameterless constructors

    Jenkins Matrix Authorization Strategy Plugin 2.0-beta-1 through 3.2.9 (both inclusive) invokes parameterless constructors of classes specified in configuration when deserializing inheritance strategies, without restricting the classes that can be instantiated…

  • Medium 5.0

    Grav CMS Cache Value FileCache.php doGet deserialization

    A vulnerability was found in Grav CMS up to 1.7.49.5/2.0.0-beta.1. Affected by this vulnerability is the function FileCache::doGet of the file system/src/Grav/Framework/Cache/Adapter/FileCache.php of the component Cache Value Handler. The manipulation results…

  • Medium 5.3

    An issue was discovered in Cista v0.15 and below. Insecure deserialization of untrusted input under certain conditions …

  • Medium 6.3

    Apache DolphinScheduler: Deserialization of untrusted data in RPC

    Deserialization of Untrusted Data vulnerability in Apache DolphinScheduler RPC module. This issue affects Apache DolphinScheduler:  Version >= 3.2.0 and < 3.3.1. Attackers who can access the Master or Worker nodes can compromise the system by creating a Stand…

  • Medium 6.2

    Deserialization of untrusted data vulnerability in Samsung Open Source Escargot Java Script allows denial of service co…

  • Medium 4.1

    Session Cache Restore — Arbitrary Free via Deserialized Pointer

    When restoring a session from cache, a pointer from the serialized session data is used in a free operation without validation. An attacker who can poison the session cache could trigger an arbitrary free. Exploitation requires the ability to inject a crafted…

  • Medium 6.5

    Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers

    A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without the `weights_only=True…

  • Medium 6.3

    pytries datrie trie File datrie.pyx Trie.__setstate__ deserialization

    A vulnerability was found in pytries datrie up to 0.8.3. The affected element is the function Trie.load/Trie.read/Trie.__setstate__ of the file src/datrie.pyx of the component trie File Handler. The manipulation results in deserialization. The attack can be l…

  • Medium 4.5

    NASA cFS Pickle pickle.load deserialization

    A vulnerability has been found in NASA cFS up to 7.0.0. The impacted element is the function pickle.load of the component Pickle Module. Such manipulation leads to deserialization. The attack needs to be performed locally. The attack requires a high level of …

  • Medium 6.5

    Replicator 1.0.5 is vulnerable to Remote Code Execution through Insecure Deserialization

    An unauthenticated remote code execution (RCE) vulnerability exists in applications that use the Replicator node package manager (npm) version 1.0.5 to deserialize untrusted user input and execute the resulting object.

  • Medium 5.4

    WordPress Stål theme < 1.7 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Mikado-Themes Stål stal allows Object Injection.This issue affects Stål: from n/a through < 1.7.

  • Medium 5.4

    WordPress Gracey theme < 1.4 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Edge-Themes Gracey gracey allows Object Injection.This issue affects Gracey: from n/a through < 1.4.

  • Medium 5.4

    WordPress Kamperen theme < 1.3 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Edge-Themes Kamperen kamperen allows Object Injection.This issue affects Kamperen: from n/a through < 1.3.

  • Medium 5.4

    WordPress Halstein theme < 1.8 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Mikado-Themes Halstein halstein allows Object Injection.This issue affects Halstein: from n/a through < 1.8.

  • Medium 5.4

    WordPress Leroux theme < 1.4 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Elated-Themes Leroux leroux allows Object Injection.This issue affects Leroux: from n/a through < 1.4.

  • Medium 5.4

    WordPress Archicon theme < 1.7 - Arbitrary Object Instantiation vulnerability

    Deserialization of Untrusted Data vulnerability in Edge-Themes Archicon archicon allows Object Injection.This issue affects Archicon: from n/a through < 1.7.

  • Medium 5.3

    PyTorch pt2 Loading deserialization

    A vulnerability was identified in PyTorch 2.10.0. The affected element is an unknown function of the component pt2 Loading Handler. The manipulation leads to deserialization. The attack can only be performed from a local environment. The exploit is publicly a…

  • Medium 6.3

    WordPress TotalContest Lite plugin <= 2.9.1 - PHP Object Injection vulnerability

    Deserialization of Untrusted Data vulnerability in TotalSuite TotalContest Lite totalcontest-lite allows Object Injection.This issue affects TotalContest Lite: from n/a through <= 2.9.1.

  • Medium 5.2

    Insecure Deserialization in extension "Mailqueue" (mailqueue)

    The extension fails to properly define allowed classes used when deserializing transport failure metadata. An attacker may exploit this to execute untrusted serialized code. Note that an active exploit requires write access to the directory configured at $GLO…

  • Medium 6.3

    Inductive Automation Ignition Software Deserialization of Untrusted Data

    A privileged Ignition user, intentionally or otherwise, imports an external file with a specially crafted payload, which executes embedded malicious code.

  • Medium 6.3

    Alfresco Activiti Process Variable Serialization System SerializableType.java createObjectInputStream deserialization

    A flaw has been found in Alfresco Activiti up to 7.19/8.8.0. Affected by this issue is the function deserialize/createObjectInputStream of the file activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/variable/SerializableType.java of the comp…

  • Medium 6.8

    LangGraph: Unsafe msgpack deserialization in LangGraph checkpoint loading

    LangGraph SQLite Checkpoint is an implementation of LangGraph CheckpointSaver that uses SQLite DB (both sync and async, via aiosqlite). In version 1.0.9 and prior, LangGraph checkpointers can load msgpack-encoded checkpoints that reconstruct Python objects du…

  • Medium 6.5

    Super Stage WP <= 1.0.1 - Unauthenticated PHP Object Injection

    The Super Stage WP WordPress plugin through 1.0.1 unserializes user input via REQUEST, which could allow unauthenticated users to perform PHP Object Injection when a suitable gadget is present on the blog.

  • Medium 6.6

    LangGraph: BaseCache Deserialization of Untrusted Data may lead to Remote Code Execution

    LangGraph Checkpoint defines the base interface for LangGraph checkpointers. Prior to version 4.0.0, a Remote Code Execution vulnerability exists in LangGraph's caching layer when applications enable cache backends that inherit from `BaseCache` and opt nodes …

  • Medium 4.6

    datapizza-labs datapizza-ai cache.py RedisCache deserialization

    A vulnerability has been found in datapizza-labs datapizza-ai 0.0.2. Affected by this vulnerability is the function RedisCache of the file datapizza-ai-cache/redis/datapizza/cache/redis/cache.py. Such manipulation leads to deserialization. The attack requires…