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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

1687 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-2025-27522 Apache InLong: JDBC Vulnerability during verification processing — Apache InLong 8.1AIHighAI2025-05-28
CVE-2025-5174 erdogant pypickle pypickle.py load deserialization — pypickle 5.3 Medium2025-05-26
CVE-2025-5173 HumanSignal label-studio-ml-backend PT File neural_nets.py load deserialization — label-studio-ml-backend 5.3 Medium2025-05-26
CVE-2025-5148 FunAudioLLM InspireMusic Pickle Data model.py load_state_dict deserialization — InspireMusic 5.3 Medium2025-05-25
CVE-2025-5114 easysoft zentaopms Editor index.php edit deserialization — zentaopms 6.3 Medium2025-05-23
CVE-2025-31049 WordPress Dash <= 1.3 - PHP Object Injection Vulnerability — Dash 9.8 Critical2025-05-23
CVE-2025-31069 WordPress HotStar – Multi-Purpose Business Theme <= 1.4 - PHP Object Injection Vulnerability — HotStar – Multi-Purpose Business Theme 9.8 Critical2025-05-23
CVE-2025-31423 WordPress Umberto theme <= 1.2.8 - PHP Object Injection Vulnerability — Umberto 9.8 Critical2025-05-23
CVE-2025-31631 WordPress Fish House theme <= 1.2.7 - PHP Object Injection Vulnerability — Fish House 9.8 Critical2025-05-23
CVE-2025-31430 WordPress The Business <= 1.6.1 - PHP Object Injection Vulnerability — The Business 9.8 Critical2025-05-23
CVE-2025-31927 WordPress Acerola <= 1.6.5 - PHP Object Injection Vulnerability — Acerola 9.8 Critical2025-05-23
CVE-2025-31924 WordPress Crafts & Arts theme <= 2.5 - PHP Object Injection Vulnerability — Crafts & Arts 8.8 High2025-05-23
CVE-2025-32284 WordPress Pet World theme <= 2.8 - PHP Object Injection Vulnerability — Pet World 8.8 High2025-05-23
CVE-2025-32292 WordPress Jarvis – Night Club, Concert, Festival WordPress theme <= 1.8.11 - PHP Object Injection Vulnerability — Jarvis – Night Club, Concert, Festival WordPress 9.8 Critical2025-05-23
CVE-2025-32293 WordPress Finance Consultant theme <= 2.8 - PHP Object Injection Vulnerability — Finance Consultant 8.8 High2025-05-23
CVE-2025-39480 WordPress Car Dealer theme < 1.6.8 - PHP Object Injection vulnerability — Car Dealer 9.8 Critical2025-05-23
CVE-2025-39485 WordPress GrandTour theme <= 5.6 - PHP Object Injection vulnerability — Grand Tour 9.8 Critical2025-05-23
CVE-2025-39495 WordPress Avantage Theme <= 2.4.9 - PHP Object Injection vulnerability — Avantage 9.8 Critical2025-05-23
CVE-2025-39500 WordPress Goodlayers Hostel Plugin <= 3.1.2 - PHP Object Injection vulnerability — Goodlayers Hostel 9.8 Critical2025-05-23
CVE-2025-39499 WordPress Medicare Theme <= 2.1.0 - PHP Object Injection vulnerability — Medicare 9.8 Critical2025-05-23
CVE-2025-39503 WordPress Goodlayers Hotel plugin <= 3.1.4 - PHP Object Injection vulnerability — Goodlayers Hotel 9.8 Critical2025-05-23
CVE-2025-47530 WordPress WPFunnels plugin <= 3.5.18 - PHP Object Injection Vulnerability — WPFunnels 9.8 Critical2025-05-23
CVE-2025-47532 WordPress CoinPayments.net Payment Gateway for WooCommerce plugin <= 1.0.17 - PHP Object Injection Vulnerability — CoinPayments.net Payment Gateway for WooCommerce 9.8 Critical2025-05-23
CVE-2025-47568 WordPress ZoomSounds plugin <= 6.91 - PHP Object Injection vulnerability — ZoomSounds 9.8 Critical2025-05-23
CVE-2025-47660 WordPress WC Affiliate plugin <= 2.16 - PHP Object Injection vulnerability — WC Affiliate 8.8 High2025-05-23
CVE-2025-48287 WordPress Pix 4x sem juros - Pagaleve plugin <= 1.6.9 - PHP Object Injection Vulnerability — Pix 4x sem juros - Pagaleve 9.8 Critical2025-05-23
CVE-2025-48289 WordPress Kids Planet theme <= 2.2.14 - PHP Object Injection Vulnerability — Kids Planet 9.8 Critical2025-05-23
CVE-2025-4803 Glossary by WPPedia <= 1.3.0 - Authenticated (Administrator+) PHP Object Injection — Glossary by WPPedia – Best Glossary plugin for WordPress 7.2 High2025-05-21
CVE-2025-48200 TYPO3 安全漏洞 — sr feuser register extension 10.0 Critical2025-05-21
CVE-2025-47277 vLLM Allows Remote Code Execution via PyNcclPipe Communication Service — vllm 9.8 Critical2025-05-20

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