Hello, you are using an old browser that's unsafe and no longer supported. Please consider updating your browser to a newer version, or downloading a modern browser.

Glossary > Serialization Deserialization Vulnerabilities

What is Serialization Deserialization Vulnerabilities?

Understanding Serialization Deserialization Vulnerabilities

Serialization/Deserialization Vulnerabilities arise when untrusted data is deserialized into objects in languages like Java, .NET, or PHP, allowing attackers to craft input that executes arbitrary code or changes application logic. Attackers can embed malicious object references, exploit gadget chains in class hierarchies, or manipulate fields to achieve remote code execution. Common pitfalls include naive trust in incoming serialized data, incomplete filtering of permissible classes, or known dangerous libraries that auto-execute certain object methods. Defenses include disallowing unknown types (whitelisting), verifying object signatures or applying cryptographic integrity checks, and using safer data formats like JSON or XML with strict parsing. Tools like ysoserial can demonstrate exploit gadget chains. Developers must also ensure ephemeral fields or hidden references aren’t inadvertently exposed. Because these exploits often bypass conventional perimeter defenses, scanning for or forcibly preventing certain classes during deserialization is crucial. Thorough code reviews, library updates, and using language-specific safe serializers help mitigate these high-impact flaws. A single deserialization bug can compromise entire systems if the code runs with high privileges, emphasizing the need for caution when bridging external inputs and object-based logic.

Learn More About Serialization Deserialization Vulnerabilities: