Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-502 (可信数据的反序列化) — Vulnerability Class 1698

1698 vulnerabilities classified as CWE-502 (可信数据的反序列化). AI Chinese analysis included.

CWE-502 represents a critical security weakness where applications deserialize untrusted data without validating its integrity or structure. Attackers typically exploit this vulnerability by crafting malicious serialized objects that, when processed by the application, trigger unintended code execution or logic flaws. This often leads to remote code execution, denial of service, or privilege escalation, as the deserialization process may instantiate dangerous classes or invoke unsafe methods. To mitigate this risk, developers must strictly avoid deserializing data from untrusted sources. Instead, they should implement robust input validation, use allowlists for permitted data types, or adopt safer serialization formats like JSON that do not inherently support arbitrary object instantiation. Additionally, employing cryptographic signatures to verify data authenticity before deserialization ensures that only trusted, unaltered payloads are processed, effectively neutralizing the threat of malicious object injection.

MITRE CWE Description
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
Common Consequences (3)
IntegrityModify 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.
AvailabilityDoS: 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.
OtherVaries 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 una…
Mitigations (5)
Architecture and Design, ImplementationIf 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.
ImplementationWhen 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.
ImplementationExplicitly define a final object() to prevent deserialization.
Architecture and Design, ImplementationMake 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.
ImplementationAvoid 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…
Examples (2)
This code snippet deserializes an object from a file and uses it as a UI button:
try { File file = new File("object.obj"); ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); javax.swing.JButton button = (javax.swing.JButton) in.readObject(); in.close(); }
Bad · Java
private final void readObject(ObjectInputStream in) throws java.io.IOException { throw new java.io.IOException("Cannot be deserialized"); }
Good · Java
In Python, the Pickle library handles the serialization and deserialization processes. In this example derived from [REF-467], the code receives and parses data, and afterwards tries to authenticate a user based on validating a token.
try { class ExampleProtocol(protocol.Protocol): def dataReceived(self, data): # Code that would be here would parse the incoming data # After receiving headers, call confirmAuth() to authenticate def confirmAuth(self, headers): try: token = cPickle.loads(base64.b64decode(headers['AuthToken'])) if not check_hmac(token['signature'], token['data'], getSecretKey()): raise AuthFail self.secure_data = token['data'] except: raise AuthFail }
Bad · Python
CVE IDTitleCVSSSeverityPublished
CVE-2023-40195 Apache Airflow Spark Provider Deserialization Vulnerability RCE — Apache Airflow Spark Provider 8.0 -2023-08-28
CVE-2023-40571 weblogic-framework Deserialization of Untrusted Data vulnerability — weblogic-framework 9.8 Critical2023-08-25
CVE-2023-34040 Java Deserialization vulnerability in Spring-Kafka When Improperly Configured — Spring For Apache Kafka 5.3 Medium2023-08-24
CVE-2023-3259 Dataprobe 代码问题漏洞 — iBoot PDU 9.8 Critical2023-08-14
CVE-2023-38181 Microsoft Exchange Server Spoofing Vulnerability — Microsoft Exchange Server 2019 Cumulative Update 12 8.8 High2023-08-08
CVE-2023-38182 Microsoft Exchange Server Remote Code Execution Vulnerability — Microsoft Exchange Server 2019 Cumulative Update 13 8.0 High2023-08-08
CVE-2023-35388 Microsoft Exchange Server Remote Code Execution Vulnerability — Microsoft Exchange Server 2019 Cumulative Update 13 8.0 High2023-08-08
CVE-2023-38689 Deserialization of Untrusted Data in network IO — LogisticsPipes 8.1 High2023-08-04
CVE-2023-36480 Aerospike Java Client vulnerable to unsafe deserialization of server responses — aerospike-client-java 9.8 Critical2023-08-04
CVE-2022-40609 IBM SDK, Java Technology Edition code execution — SDK, Java Technology Edition 8.1 High2023-08-02
CVE-2023-24971 IBM B2B Advanced Communication denial of service — B2B Advanced Communications 7.5 High2023-07-31
CVE-2023-38647 Apache Helix: Deserialization vulnerability in Helix workflow and REST — Apache Helix 9.8 -2023-07-26
CVE-2023-37895 Apache Jackrabbit RMI access can lead to RCE — Apache Jackrabbit Webapp (jackrabbit-webapp) 9.8 -2023-07-25
CVE-2023-34434 Apache InLong: JDBC URL bypassing by allowLoadLocalInfileInPath param — Apache InLong 7.5 -2023-07-25
CVE-2023-3324 Insecure deserialization in zenon internal DLLs — ABB Ability™ zenon 6.3 Medium2023-07-24
CVE-2023-38203 Analysis CVE-2023-29300 Bypass: Adobe ColdFusion Pre-Auth RCE — ColdFusion 9.8 Critical2023-07-20
CVE-2023-28754 ShardingSphere-Agent: Deserialization vulnerability in ShardingSphere Agent — ShardingSphere-Agent 7.8 -2023-07-19
CVE-2023-26512 Apache EventMesh RabbitMQ-Connector plugin allows RCE through deserialization of untrusted data — Apache EventMesh (incubating) RabbitMQ connector 9.8 -2023-07-17
CVE-2023-25770 Controller stack overflow on decoding messages from the server — C300 9.8 Critical2023-07-13
CVE-2023-3343 User Registration <= 3.0.1 - Authenticated (Subscriber+) PHP Object Injection — User Registration & Membership – Free & Paid Memberships, Subscriptions, Content Restriction, User Profile, Custom User Registration & Login Builder 8.8 High2023-07-13
CVE-2023-29300 Adobe ColdFusion Deserialization of Untrusted Data Arbitrary code execution — ColdFusion 9.8 Critical2023-07-12
CVE-2023-36825 Orchid Deserialization of Untrusted Data vulnerability leads to Remote Code Execution — platform 9.7 Critical2023-07-11
CVE-2023-33160 Microsoft SharePoint Server Remote Code Execution Vulnerability — Microsoft SharePoint Enterprise Server 2016 8.8 High2023-07-11
CVE-2023-33134 Microsoft SharePoint Server Remote Code Execution Vulnerability — Microsoft SharePoint Enterprise Server 2016 8.8 High2023-07-11
CVE-2023-35317 Windows Server Update Service (WSUS) Elevation of Privilege Vulnerability — Windows Server 2019 7.8 High2023-07-11
CVE-2023-34347 ​Delta Electronics InfraSuite Device Master Deserialization of Untrusted Data — Infrasuite Device Master 9.8 Critical2023-07-10
CVE-2023-33008 Apache Johnzon: Prevent inefficient internal conversion from BigDecimal at large scale — Apache Johnzon 7.5 -2023-07-07
CVE-2023-31222 Medtronic Paceart MSMQ Deserialization of Untrusted Data — Paceart Optima 9.8 Critical2023-06-29
CVE-2023-33299 Fortinet FortiNAC 代码问题漏洞 — FortiNAC 9.6 Critical2023-06-23
CVE-2023-3308 whaleal IceFrog Aviator Template Engine deserialization — IceFrog 5.5 Medium2023-06-18

Vulnerabilities classified as CWE-502 (可信数据的反序列化) represent 1698 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.