Lesson 3 of 9 · 18m
Impact, Blast Radius, and What Attackers Actually Want
Why deserialization bugs often become RCE, when they stop at data tampering or denial of service, and how deployment details decide severity.
Insecure deserialization is famous for remote code execution, but the correct mental model is broader: attacker-controlled object construction gives the attacker leverage inside your runtime. Sometimes that leverage becomes a shell. Sometimes it becomes a forged admin object, a cache poisoner, a file overwrite, or a cheap process crash. Deployment details decide which one you get.
The impact ladder
object shape abuse -> authorization confusion -> dangerous method invocation -> filesystem/network action -> command executionNot every environment supplies the whole ladder. A hardened JVM without useful classpath gadgets may fail at step three. A PHP application with rich framework objects and writable file paths may offer everything an attacker needs. A Python service that imports powerful modules makes pickle exploitation trivial.
RCE is a property of the whole application
The vulnerability is not only unserialize(user_input). Exploitability depends on what classes are reachable, what dependencies are loaded, which modules are importable, and what process privileges exist. Two applications can share the same vulnerable call site and have completely different outcomes.
Attackers inventory the environment for exactly this reason. They look for framework classes, logging utilities, templating objects, command wrappers, and dependency versions with known gadget chains. Defenders should do the same inventory before an incident forces the issue.
Denial of service is still real exploitation
Even formats that cannot instantiate arbitrary classes can be dangerous when reconstruction is expensive. Deep nesting, repeated references, huge strings, and decompression bombs can consume memory or CPU before validation finishes:
{"a": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}A parser limit is a security control. Set maximum input bytes, maximum depth, maximum object count, and strict timeouts where the library supports them. If the library does not support limits, put a size and content-type boundary in front of it and isolate parsing in a constrained worker.
Privilege multiplies mistakes
A deserialization flaw in a root-owned daemon is a host compromise. The same flaw in a sandboxed worker with no network egress may be a reliability bug. This does not mean low-privilege parsing makes the bug acceptable; it means blast-radius reduction is a real mitigation while you replace the dangerous format.
Field notes
- The most dangerous endpoints often hide behind “operations,” “import,” “worker callbacks,” and “cache restore,” not public API routes.
- Treat object stores and message queues as input sources. Attackers who cannot reach the parser directly may poison what it consumes.
- Dependency version matters because gadget availability changes with the classpath or installed packages.
- Do not assess exploitability solely by whether a public exploit exists; lack of a published chain is not lack of impact.
Was this lesson helpful?