Skip to content
RCE Write-up Advanced

WebLogic RCE (CVE-2019-2725) Debug Diary

The wls9_async_response.war and wls-wsat.war components in Oracle WebLogic deserialise attacker-supplied XML through XMLDecoder without adequate filtering, so an unauthenticated attacker can send a crafted HTTP request and execute arbitrary commands on the server. The author shows that the CVE-2017-10271 blacklist can be bypassed using the class and property tags, and that the same flaw affects multiple WebLogic versions and JDKs.

paper.seebug.org

Published on paper.seebug.org

On April 17, 2019, CNVD released the security bulletin, tracked as CNVD-C-2019-48814. The bulletin pointed out that the wls9asyncresponse.war package included in some versions of WebLogic by default provides asynchronous communication for WebLogic Server service.

The author, on paper.seebug.org

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

Likely the XMLDecoder-based deserialisation in the async and wls-wsat components accepts XML tags that the CVE-2017-10271 blacklist does not block, in particular the class and property tags, allowing arbitrary object creation and method invocation.

Impact

An unauthenticated attacker could execute arbitrary commands on the WebLogic server; the author notes that the property-tag payload works on JDK 7 but not JDK 6, and that patched installations block the fake PoCs.

What the attacker needed

Network access to the WebLogic HTTP port; vulnerable wls9_async_response or wls-wsat component; no authentication required

The fix

Oracle released an out-of-band patch that added the class tag to the blacklist, but the report notes the fix still relies on a blacklist.

How it was found

  1. Access the _async/AsyncResponseService endpoint and send a normal SOAP message to reach the AsyncResponseHandler.
  2. Add a RelatesTo header so the handler proceeds past the missing property check.
  3. Send a request that reaches the UnitOfWorkChangeSet readObject method and try a ysoserial gadget.
  4. Observe that the Jdk7u21 and CVE-2018-3191 gadgets execute commands despite the blacklist.
  5. Use the class tag to create a java.net.Socket instance and confirm an outbound request is received.
  6. Use the property tag to build a JdbcRowSetImpl payload that triggers a JNDI lookup and executes a command on both 10.3.6 and 12.1.3.

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.

WebLogic is a Java application server. Some of its built-in web services accept XML data and turn it back into Java objects, a process called deserialisation. If an attacker can control that XML, they can make the server create dangerous objects and run their commands. This report walks through how the author found such a path and how a previous fix could be bypassed.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.