Insecure Deserialization
Summary
Insecure Deserialization allows an attacker to execute arbitrary code via deserialization of untrusted data.
Testing methodology
Description
Insecure Deserialization is a vulnerability that allows an attacker to execute arbitrary code by manipulating serialized data.
Attackers can abuse Insecure Deserialization to take full remote control over the application, steal sensitive data, or perform other malicious actions.
Remediations
- Implement strict type constraints during deserialization. Only accept serialized objects that match expected object types.
- Where possible, use safe alternatives to serialization. For example, if you only need to store simple data, consider using data formats that do not support serialization of arbitrary objects, such as
- Allowlists are a great way of limiting what types of objects can be deserialized. Only objects that are on the allowlist will be allowed to be deserialized, making it far harder for an attacker to use
- Sign serialized objects to ensure they haven't been tampered with during transport. Before deserializing an object, verify the signature to ensure the integrity of the data.
Affected components
- Server