Java Serialization Object
ID |
java_serialization_object |
Severity |
high |
Kind |
Remote Code Execution |
CWE |
502 |
Description
Java Serialization seems to be in use. If not correctly validated, an attacker can send a specially crafted object. This can lead to a dangerous "Remote Code Execution". A magic sequence identifying JSO has been detected (Base64: rO0AB, Raw: 0xac, 0xed, 0x00, 0x05).
Rationale
Unsafe deserialization allows attackers to execute arbitrary code by crafting malicious serialized objects that trigger code execution during the deserialization process. When a Java application deserializes untrusted data without proper validation, the attacker can manipulate the object graph to invoke dangerous methods through gadget chains present in the application’s classpath. This can lead to complete system compromise, including data exfiltration, backdoor installation, or lateral movement within the network.
Remediation
Avoid deserializing untrusted data entirely. If deserialization is necessary, implement strict allowlists of permitted classes using ObjectInputStream filters (introduced in Java 9) or similar mechanisms. Consider using safer data formats like JSON or XML with schema validation. Apply principle of least privilege to the application runtime environment to limit the impact of successful exploitation.