Skip to content
RCE Disclosed report Intermediate CVE-2017-10271

RCE on █████ via CVE-2017-10271

The server was running an unpatched Oracle WebLogic instance vulnerable to CVE-2017-10271, which allows Java code execution through a crafted SOAP request. The reporter proved execution by making the server sleep for twelve seconds, meaning an attacker could run arbitrary code on the host.

Sam Erb Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 4 days
  • Fixed in 26 days
  • Disclosed after 52 days

Summary: Happy Friday! The server at ██████ is vulnerable to CVE-2017-10271 "Oracle WebLogic Server Remote Command Execution".

Description: The following request takes 12 seconds (12000 milliseconds) to complete:

POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: ██████████
Content-Length: 423
content-type: text/xml
Accept-Encoding: gzip, deflate, compress
Accept: */*

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
    <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
      <java class="java.beans.XMLDecoder">
        <object class="java.lang.Thread" method="sleep">
          <long>12000</long>
        </object>
      </java>
    </work:WorkContext>
  </soapenv:Header>
  <soapenv:Body/>
</soapenv:Envelope>

This proves that I have Java code execution on the remote server.

ref: https://techblog.mediaservice.net/2018/07/cve-2017-10271-oracle-weblogic-server-remote-command-execution-sleep-detection-payload/

Public exploits for this exist: https://github.com/c0mmand3rOpSec/CVE-2017-10271 I was not able to use that script with a ping command, which might have been blocked by preventing outbound connections.

Suggested Mitigation/Remediation Actions

Patch & possibly don't allow external access.

Impact

Critical, RCE.

The original report as published on HackerOne, by erbbysam. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

The target is a server at ██████ in the U.S. Department of Defence bug bounty program on HackerOne. The report identifies it as running Oracle WebLogic Server and being vulnerable to CVE-2017-10271, described as "Oracle WebLogic Server Remote Command Execution". The request targets /wls-wsat/RegistrationPortTypeRPC and carries a work:WorkContext SOAP header containing a java.beans.XMLDecoder object.

Setup

The report does not describe any accounts, roles, tools or versions. The only precondition shown is network access to the WebLogic server on the /wls-wsat/RegistrationPortTypeRPC path. The researcher used a raw HTTP request and referenced a public exploit script, but the report does not say which tools were used to send the request.

Finding it

The researcher sent a request that asks the server to sleep for 12 seconds. The delay is the signal: if the response takes roughly 12 seconds, the Java code in the SOAP header was executed on the server.

Exploitation

Step 1: Send a sleep payload to the WS-AT endpoint

The following request was sent. The report states that it takes 12 seconds (12000 milliseconds) to complete.

HTTP
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: ██████████
Content-Length: 423
content-type: text/xml
Accept-Encoding: gzip, deflate, compress
Accept: */*

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
    <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
      <java class="java.beans.XMLDecoder">
        <object class="java.lang.Thread" method="sleep">
          <long>12000</long>
        </object>
      </java>
    </work:WorkContext>
  </soapenv:Header>
  <soapenv:Body/>
</soapenv:Envelope>

The request targets /wls-wsat/RegistrationPortTypeRPC with a text/xml content type. The SOAP envelope contains a work:WorkContext header in the http://bea.com/2004/06/soap/workarea/ namespace. Inside it, a java element with class java.beans.XMLDecoder carries an object of class java.lang.Thread using the sleep method with a long value of 12000. The SOAP body is empty. The 12-second response time is the evidence that the server executed the Java code, which the researcher states proves Java code execution on the remote server.

The researcher references a write-up on the sleep detection payload: https://techblog.mediaservice.net/2018/07/cve-2017-10271-oracle-weblogic-server-remote-command-execution-sleep-detection-payload/.

Step 2: Attempt a public exploit with a ping command

The report notes that public exploits for this vulnerability exist, linking to https://github.com/c0mmand3rOpSec/CVE-2017-10271. The researcher was not able to use that script with a ping command, which the report suggests might have been blocked by preventing outbound connections. No request or output from that attempt is shown.

Root cause

The report does not analyse the root cause beyond naming CVE-2017-10271. The request carries a work:WorkContext SOAP header containing a java.beans.XMLDecoder object, and the response was delayed by 12 seconds. Why existing defences did not stop the request is not discussed.

Impact

The researcher rates the impact as critical, remote command execution. The sleep payload proves Java code execution on the server. The failed ping attempt suggests outbound network connections may be blocked, but the report only offers that as a possible explanation.

Fix

The suggested mitigation and remediation actions in the report are: patch, and possibly do not allow external access.

Variants to test

  • Send the same sleep payload to /wls-wsat/RegistrationPortTypeRPC on other WebLogic instances. A positive result is a response delayed by roughly the requested sleep duration, indicating code execution.
  • Try other WS-AT endpoints under /wls-wsat/ if the registration endpoint is not present. A positive result is the same timing behaviour.
  • If the sleep payload works but a command execution payload does not produce output, test whether outbound connections are blocked, as the report suspects for its ping attempt. A positive result is a command that produces an observable effect without outbound network access.

Hunting notes

This bug hides in WebLogic Server instances that expose the /wls-wsat/ WS-AT endpoints. The researcher showed enough impact with a timing side channel: a 12-second sleep in the response is direct evidence of Java code execution, without needing command output or outbound connectivity.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

A security researcher was looking at a server belonging to the U.S. Department of Defence, as part of a bug bounty program on HackerOne. A bug bounty program is an arrangement where an organisation invites outside people to look for security problems in its systems and report them, often for a reward. The report identifies the server as running Oracle WebLogic Server and being vulnerable to CVE-2017-10271. The flaw has a public identifier, CVE-2017-10271, and its official description is "Oracle WebLogic Server Remote Command Execution".

"Remote command execution" means that someone sitting at another computer, somewhere else on the network, can make the server run instructions of their choosing. That is about as bad as a web server problem gets, because the server then does what the attacker tells it to, using its own permissions. The researcher rated the impact as critical.

To prove the flaw was really there, the researcher sent a request that asks the server to sleep for 12 seconds. They sent the server a specially crafted request that asked it to do nothing for 12 seconds, and then measured how long the reply took. The report states that the request takes 12 seconds to complete, which the researcher says proves Java code execution. This is a neat, low-risk way to demonstrate a serious problem.

Context

The target is a server at ██████ in the U.S. Department of Defence bug bounty program on HackerOne. The report identifies it as running Oracle WebLogic Server and being vulnerable to CVE-2017-10271, described as "Oracle WebLogic Server Remote Command Execution".

A few terms from that paragraph, from zero:

  • Server: a computer whose job is to answer requests from other computers. When you open a website, your browser asks a server for a page and the server sends it back.
  • Oracle WebLogic Server: a large piece of software made by Oracle that organisations use to run their business applications on the web. Think of it as a very capable receptionist that sits in front of many internal services and passes messages between them.
  • CVE: "Common Vulnerabilities and Exposures". A public catalogue where each known security flaw gets a permanent ID number, so that everyone talking about the same flaw uses the same name. CVE-2017-10271 is one entry in that catalogue, from 2017.

The affected endpoint is the WebLogic Web Services Atomic Transaction (WS-AT) component, reached through /wls-wsat/RegistrationPortTypeRPC. An endpoint is a specific address on a server, like a particular counter in a large building: the building has one street address, but inside there are many counters, each dealing with a different kind of request. This endpoint is one such counter.

WS-AT stands for Web Services Atomic Transaction. In plain terms, it is a feature that lets several separate programs take part in one combined operation and agree that either all of them succeed or none of them do. The everyday comparison is a bank transfer: money must leave one account and arrive in another, and you do not want a situation where it leaves but never arrives. WS-AT is the machinery that coordinates that kind of "all or nothing" agreement between programs.

That endpoint normally accepts SOAP requests for WS-AT registration. SOAP is a standard format for messages exchanged between programs: it is written in XML, a text format built from tags in angle brackets, and it has a fixed structure with an envelope, a header and a body. Think of it as a formal letter with a standard envelope, a section for handling instructions and a section for the actual content.

The vulnerability lets a SOAP header carry a serialised Java object that WebLogic deserialises, which is the basis for the remote command execution. Two more terms:

  • Java object: Java is a programming language, and an object is a bundle of data plus the operations that can be performed on it. A "Thread" object, for example, represents a unit of work running inside a program, and one of the things you can ask a thread to do is sleep for a while.
  • Serialise / deserialise: serialising means turning a live object in a program's memory into a stream of text or bytes so it can be stored or sent. Deserialising is the reverse: taking that stream and rebuilding the object. The danger is that if the stream comes from an untrusted source, the receiver may rebuild an object that does something harmful when it is created or used. The everyday comparison is a flat-pack furniture kit: normally you receive the parts and the instructions and build a chair, but if someone slips different instructions into the box, you may build something you never intended.

The report names CVE-2017-10271 and shows a request that causes a 12-second delay.

Setup

The report does not describe any accounts, roles, tools or versions. The only precondition shown is network access to the WebLogic server on the /wls-wsat/RegistrationPortTypeRPC path. In other words, the researcher needed to be able to reach that address over the network, the same way your browser needs to be able to reach a website before it can load it.

The researcher used a raw HTTP request and referenced a public exploit script, but the report does not say which tools were used to send the request. A raw HTTP request is the actual text that a browser or other program sends to a server when it asks for something. Browsers normally build this text for you and hide it, but security testers often write it by hand so they can put exactly what they want into it. HTTP is the language of requests and responses on the web: your browser sends a request, the server sends a response with a status and some content.

Finding it

The researcher sent a request that asks the server to sleep for 12 seconds. The delay is the signal: if the response takes roughly 12 seconds, the Java code in the SOAP header was executed on the server.

Why this approach? Because it is safe and unambiguous. The researcher is not trying to read files or change anything; they are asking the server to pause. The researcher states that the 12-second delay proves Java code execution on the remote server. It is like checking whether a light switch is wired up by asking someone to flick it and watching whether the bulb comes on, rather than taking the wiring apart.

Exploitation

Step 1: Send a sleep payload to the WS-AT endpoint

The following request was sent. The report states that it takes 12 seconds (12000 milliseconds) to complete.

HTTP
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: ██████████
Content-Length: 423
content-type: text/xml
Accept-Encoding: gzip, deflate, compress
Accept: */*

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
    <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
      <java class="java.beans.XMLDecoder">
        <object class="java.lang.Thread" method="sleep">
          <long>12000</long>
        </object>
      </java>
    </work:WorkContext>
  </soapenv:Header>
  <soapenv:Body/>
</soapenv:Envelope>

Line by line, in plain words:

  • POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1 is the first line of the request. POST is the method, meaning "I am sending data to you", as opposed to GET, which means "give me a page". /wls-wsat/RegistrationPortTypeRPC is the endpoint, the specific counter in the building. HTTP/1.1 says which version of the web protocol is being used.
  • Host: ██████████ names the server the request is for. One server can host many websites, so this line tells it which one is meant. The actual name has been hidden in the report.
  • Content-Length: 423 says how many bytes of content follow the blank line. The server uses this to know when the message ends.
  • content-type: text/xml tells the server that the body is XML text, so it should be parsed as such rather than, say, treated as an image.
  • Accept-Encoding: gzip, deflate, compress lists the compression formats the sender can handle in the reply. This is a normal browser-style header and has nothing to do with the attack.
  • Accept: */* says the sender will accept any kind of reply.
  • The blank line separates the headers from the body. Everything after it is the content.
  • <soapenv:Envelope ...> opens the SOAP envelope, the outer wrapper of the message. The xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" part declares the namespace, which is a way of saying which standard these tags belong to, so that two different standards using the same tag name do not get confused.
  • <soapenv:Header> opens the header section, where handling instructions go.
  • <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"> opens a work context inside that header. This is the part of the message that the vulnerable WebLogic component reads and acts on.
  • <java class="java.beans.XMLDecoder"> is the dangerous part. java.beans.XMLDecoder is a standard Java class whose whole purpose is to rebuild Java objects from XML text. The request is telling WebLogic to use it on the content that follows.
  • <object class="java.lang.Thread" method="sleep"> asks for an object of class java.lang.Thread, which represents a unit of work in a Java program, and names the method sleep.
  • <long>12000</long> supplies the argument to that method: the number 12000, as a long (a whole number type in Java). The unit is milliseconds, so 12000 milliseconds is 12 seconds.
  • The closing tags </object>, </java>, </work:WorkContext>, </soapenv:Header> close each section in turn, the way brackets must be closed in the right order.
  • <soapenv:Body/> is an empty body. The self-closing slash means there is nothing inside it. The attack lives entirely in the header, which is why the body can be empty.
  • </soapenv:Envelope> closes the envelope.

Put together, the request says: "Here is a work context containing an instruction to build a Java Thread object and call its sleep method for 12000 milliseconds." If the server obeys, it pauses for 12 seconds before replying. The 12-second response time is the evidence that the server executed the Java code, which the researcher states proves Java code execution on the remote server.

This kind of proof is sometimes called a timing side channel: you learn something about what happened inside a system by measuring how long it took, rather than by reading the answer directly. The everyday comparison is knocking on a door and listening for footsteps: you cannot see inside, but the delay tells you someone is home and walking towards you.

The researcher references a write-up on the sleep detection payload: https://techblog.mediaservice.net/2018/07/cve-2017-10271-oracle-weblogic-server-remote-command-execution-sleep-detection-payload/.

Step 2: Attempt a public exploit with a ping command

The report notes that public exploits for this vulnerability exist, linking to https://github.com/c0mmand3rOpSec/CVE-2017-10271. A public exploit is code that someone has published which automates an attack against a known flaw. It is useful for defenders to test their own systems, and it also means that anyone, including criminals, can try the same thing.

The researcher was not able to use that script with a ping command, which the report suggests might have been blocked by preventing outbound connections. ping is a simple network tool that sends a small message to another computer and waits for a reply, mainly to check whether that computer is reachable. If a server is configured not to make connections out to the internet, a ping sent from it will fail even though the code execution itself worked. The report offers this only as a possible explanation. No request or output from that attempt is shown.

Root cause

The report does not analyse the root cause beyond naming CVE-2017-10271. The request carries a work:WorkContext SOAP header containing a java.beans.XMLDecoder object, and the response was delayed by 12 seconds. Why existing defences did not stop the request is not discussed.

In beginner terms, the root cause is a trust mistake. The server accepts a message from the network and treats part of it as instructions for rebuilding and running code, without checking that the sender is entitled to send such instructions. A patch is an update from the software maker that fixes a known flaw. The report's suggested remediation is to patch.

Impact

The researcher rates the impact as critical, remote command execution. The sleep payload proves Java code execution on the server. "Arbitrary" here means the attacker is not limited to sleeping: the same mechanism could carry other instructions. The failed ping attempt suggests outbound network connections may be blocked, but the report only offers that as a possible explanation.

Fix

The suggested mitigation and remediation actions in the report are: patch, and possibly do not allow external access. "Do not allow external access" means restricting who can reach the endpoint at all, for example so that only trusted internal networks can connect to it.

Variants to test

  • Send the same sleep payload to /wls-wsat/RegistrationPortTypeRPC on other WebLogic instances. A positive result is a response delayed by roughly the requested sleep duration, indicating code execution.
  • Try other WS-AT endpoints under /wls-wsat/ if the registration endpoint is not present. A positive result is the same timing behaviour.
  • If the sleep payload works but a command execution payload does not produce output, test whether outbound connections are blocked, as the report suspects for its ping attempt. A positive result is a command that produces an observable effect without outbound network access.

Hunting notes

This bug hides in WebLogic Server instances that expose the /wls-wsat/ WS-AT endpoints. Recon, short for reconnaissance, is the early stage of security testing where you find out what is running and where, before trying anything. The researcher showed enough impact with a timing side channel: a 12-second sleep in the response is direct evidence of Java code execution, without needing command output or outbound connectivity.

Glossary

  • Bug bounty program: an arrangement where an organisation invites outside researchers to find and report security problems, often with a reward.
  • Server: a computer that answers requests from other computers over a network.
  • Oracle WebLogic Server: Oracle's software platform for running business applications on the web.
  • CVE: Common Vulnerabilities and Exposures, a public catalogue that gives every known security flaw a permanent ID.
  • Remote command execution (RCE): a flaw that lets someone on another machine make a system run instructions of their choosing.
  • Endpoint: a specific address or path on a server that handles a particular kind of request.
  • WS-AT (Web Services Atomic Transaction): a feature that coordinates several programs so that a combined operation either fully succeeds or fully fails.
  • SOAP: a standard XML format for messages exchanged between programs, with an envelope, a header and a body.
  • XML: a text format built from tags in angle brackets, used to structure data.
  • Namespace: a label in XML that says which standard a set of tags belongs to, so identical tag names do not clash.
  • Java: a widely used programming language and runtime.
  • Java object: a bundle of data and the operations that can be performed on it inside a Java program.
  • Serialise / deserialise: turning a live object into text or bytes, and rebuilding it from that text or bytes.
  • java.beans.XMLDecoder: a standard Java class that rebuilds Java objects from XML text.
  • java.lang.Thread: a Java class representing a unit of work in a program; it has a sleep method that pauses for a given number of milliseconds.
  • Millisecond: one thousandth of a second; 12000 milliseconds is 12 seconds.
  • Raw HTTP request: the literal text a program sends to a server, written by hand rather than generated by a browser.
  • HTTP: the request and response protocol used on the web.
  • POST: an HTTP method meaning "I am sending data to you".
  • Host header: the line in an HTTP request that names which site on the server is meant.
  • Content-Length: the header stating how many bytes of content follow.
  • Content-Type: the header stating what format the content is in, such as text/xml.
  • Timing side channel: learning what happened inside a system by measuring how long it took, rather than reading the answer.
  • Public exploit: published code that automates an attack against a known flaw.
  • ping: a network tool that checks whether another computer is reachable by sending a small message and waiting for a reply.
  • Outbound connection: a connection started by the server itself towards another machine, such as the internet.
  • Patch: an update from a software maker that fixes a known flaw.
  • Mitigation / remediation: steps taken to reduce or remove a security problem.
  • Recon (reconnaissance): the early stage of security testing where you find out what is running and where.
  • Critical: the highest severity rating, meaning the flaw can cause very serious harm and should be fixed urgently.

More by Sam Erb

View all

1 more disclosed report, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

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.