GHSL-2021-097: Pre-Auth Unsafe Java Deserialization in Apace Dubbo - CVE-2021-37579
Apache Dubbo's serialization security check can be bypassed by supplying a valid service path with a non-existent version, causing the check to skip and allowing unsafe Java deserialization. An attacker could achieve pre-auth remote code execution.
Originally disclosed on GitHub Security Lab
Apache Dubbo 2.6.10.1 introduced a new property to prevent consumers from changing the serialization type specified by the provider (serialization.security.check)
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 security check looks up the service using both path and version, but the later deserialization step only uses the path, so a mismatched version bypasses the check.
Impact
This issue may lead to pre-auth Remote Code Execution (RCE).
What the attacker needed
Network access to Dubbo port; serialization.security.check enabled (default)
The fix
The issue was fixed by updating the code to properly enforce the serialization check.
How it was found
- Craft a Dubbo request with the Java serialization flag set in the header.
- Include a valid service path and a non-existent version in the request body.
- Append a malicious serialized object as the parameter.
- Send the request to the Dubbo port (e.g., 20880).
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 Dubbo is a system that lets programs talk to each other over a network. It has a safety check to stop attackers from sending malicious data that gets turned into live objects (deserialization), which can run code. The check can be fooled by giving a real service name but a fake version number, so the malicious data is processed and the attacker can run their own code without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.