CVE-2020-2555: RCE Through a Deserialization Bug in Oracle’s WebLogic Server
The Oracle Coherence library contained a deserialization gadget chain that allowed an attacker to call arbitrary Java methods via reflection. An attacker who could deliver a malicious serialized object to a vulnerable application, such as WebLogic Server, could achieve remote code execution.
zerodayinitiative.com
Published on zerodayinitiative.com
Insecure deserialization vulnerabilities have become a popular target for attackers/researchers against Java web applications. These vulnerabilities often lead to reliable remote code execution and are generally difficult to patch.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The LimitFilter.toString() method called extract(), which could reach ReflectionExtractor and invoke arbitrary methods via reflection, and this chain was reachable from deserialization entry points such as BadAttributeValueExpException.readObject().
What the attacker needed
Application uses Oracle Coherence library; attacker can deliver a serialized object
How it was found
- Study the patch to find that LimitFilter.toString() no longer calls extract().
- Identify that BadAttributeValueExpException.readObject() can call toString() on an arbitrary class.
- Find that ReflectionExtractor.extract() calls Method.invoke() with attacker-controlled method and parameters.
- Use ChainedExtractor to chain extract() calls and build a gadget chain.
- Deliver the malicious serialized object to a vulnerable application, such as via WebLogic's T3 protocol.
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 write-up has not been written yet. The Original tab links to the source.
When Java programs save or send objects, they convert them into a stream of bytes and later rebuild them, a process called deserialization. If an attacker can supply a crafted byte stream, the program may rebuild objects that trigger dangerous methods. Here, a chain of such objects let the attacker run any command on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.