GHSL-2021-086: Unsafe Deserialization in Apache Storm supervisor - CVE-2021-40865
The Apache Storm supervisor's Netty server deserialises untrusted data using Kryo with Java serialisation fallback, allowing an attacker to send a malicious packet that triggers unsafe deserialisation. This can lead to pre-authentication remote code execution.
Originally disclosed on GitHub Security Lab
An Unsafe Deserialization vulnerability exists in the worker services of the Apache Storm supervisor server allowing pre-auth Remote Code Execution (RCE)
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The Netty server's message decoder uses Kryo with a fallback to Java's ObjectInputStream for deserialising untrusted network data, without restricting the types that can be deserialised.
Impact
This issue may lead to pre-auth RCE.
What the attacker needed
Network access to the supervisor's Netty port (default 6700)
The fix
The vulnerability was fixed in Apache Storm version 2.3.0 and subsequent releases 2.2.1, 2.1.1, and 1.2.4.
How it was found
- Connect to the Netty worker service port (default 6700).
- Send a packet with code -600 (BackPressureStatus identifier) followed by a length and a serialised payload.
- The server deserialises the payload using Kryo, which falls back to Java serialisation, triggering the gadget.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Apache Storm is a system for processing large amounts of data. Its supervisor component listens on network ports and accepts messages from other machines. The bug is that it blindly converts incoming data into Java objects without checking what those objects are, so an attacker can send a crafted message that makes the server run harmful code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.