Remote OS Command Execution on Oracle Weblogic server via [CVE-2017-10271]
An outdated Oracle WebLogic instance exposed the wls-wsat endpoint, which deserialises XML sent by unauthenticated users. An attacker could send a crafted SOAP request to run operating system commands on the server.
Originally disclosed on HackerOne
- Triaged in 8 days
- Fixed in 33 days
- Disclosed after 14 months
Summary by the researcher
CVE-2017-10271 :
- Vulnerability in the Oracle WebLogic Server component of Oracle Fusion Middleware (subcomponent: WLS Security). Supported versions that are affected are 10.3.6.0.0, 12.1.3.0.0, 12.2.1.1.0 and 12.2.1.2.0. Easily exploitable vulnerability allows unauthenticated attacker with network access via T3 to compromise Oracle WebLogic Server. Successful attacks of this vulnerability can result in takeover of Oracle WebLogic Server.
The report
##Summary
Hello. I was able to identify RCE vulnerability due to the outdated Oracle Weblogic instance on https://raebilling.mtn.co.za.
##Steps To Reproduce
- To reproduce, launch this request with BurpSuite
- This request to the
https://raebilling.mtn.co.za/wls-wsat/CoordinatorPortTypewill trigger sleep for 15 seconds (same applies for 20 secondes, 40 seconds):
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: raebilling.mtn.co.za
Content-Length: 426
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>40000</long>
</object>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
==POC:==



Suggested Mitigation/Remediation Actions
- Patching WebLogic to the recent version will fix the issue.
Impact
This vulnerability allow an unauthenticated attacker:
- To perform Remote OS Command Execution.
Context
The target is raebilling.mtn.co.za, a host in the MTN Group estate. It runs an Oracle WebLogic Server instance that the researcher describes as outdated. The vulnerable path is /wls-wsat/, which the researcher targeted on this host. The endpoint accepts SOAP messages, and the researcher reached it without credentials.
The bug class is CVE-2017-10271, an OS command injection in the WLS Security subcomponent of Oracle Fusion Middleware. As quoted in the report, the affected versions are 10.3.6.0.0, 12.1.3.0.0, 12.2.1.1.0 and 12.2.1.2.0. The vulnerability is described as easily exploitable by an unauthenticated attacker with network access via T3, and a successful attack can result in takeover of the WebLogic Server.
Setup
No accounts, roles or credentials are needed: the quoted CVE description says the flaw is exploitable by an unauthenticated attacker. The only tool the researcher names is Burp Suite, used to launch the request. The researcher sent the request to the host and received the delayed response.
Finding it
The researcher identified the host as running an outdated Oracle WebLogic instance and recognised it as a candidate for CVE-2017-10271. The researcher identified the host as running an outdated Oracle WebLogic instance.
Exploitation
Step 1: Send a SOAP request to the WS-AT endpoint
The researcher sends a POST to the coordinator endpoint with a SOAP envelope whose header carries a work:WorkContext element. Inside it, a java.beans.XMLDecoder object instantiates java.lang.Thread and calls its sleep method with a long value of 40000.
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: raebilling.mtn.co.za
Content-Length: 426
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>40000</long>
</object>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
The important parts:
- The path
/wls-wsat/RegistrationPortTypeRPCis one of the WS-AT coordinator servlets. The researcher also refers to/wls-wsat/CoordinatorPortTypeas the endpoint that triggers the behaviour. content-type: text/xmltells the server to parse the body as XML.- The header carries a
java.beans.XMLDecoderobject that creates ajava.lang.Threadand calls itssleepmethod with the value 40000.
Step 2: Observe the delay
The researcher states that the request triggers a sleep of 15 seconds, and that the same applies for 20 seconds and 40 seconds. The three screenshots are the proof of concept.



The report shows the request triggering a sleep of 15, 20 and 40 seconds. The report does not show command output or a shell, only the timing behaviour.
Root cause
The report does not analyse the server-side code. Because the endpoint is reachable before authentication, an unauthenticated client can supply arbitrary object graphs, and the XMLDecoder will instantiate them and invoke methods on them.
The report does not analyse the server-side code further.
Impact
The report states that the vulnerability allows an unauthenticated attacker to perform Remote OS Command Execution. The quoted CVE description adds that a successful attack can result in takeover of the Oracle WebLogic Server. The proof shown is a timing delay, not command output, so the command execution capability is asserted from the vulnerability class rather than demonstrated end to end in the report.
Fix
The suggested remediation is to patch WebLogic to a recent version, which fixes the issue. The report does not say whether the host was patched or how the issue was closed.
Variants to test
Hunting notes
This kind of bug hides on internet-facing WebLogic instances that expose the /wls-wsat/ path. The researcher demonstrated a delay at three different durations. The report was rated critical with a CVSS score of 9.4.
What happened, in plain words
A security researcher found that a website belonging to MTN Group, raebilling.mtn.co.za, was running an old version of a piece of server software called Oracle WebLogic Server. That old version has a well-known flaw, catalogued as CVE-2017-10271, which the report says allows an unauthenticated attacker to perform Remote OS Command Execution. The researcher proved it by sending a specially crafted request that made the server pause for a set number of seconds. The pause is the evidence: it shows the request reached the server's inner machinery and made it do something the sender asked for. The report was rated critical, with a CVSS score of 9.4.
The vulnerability, explained from zero
What WebLogic is
A web server is a program that sits on a computer and answers requests from browsers and other programs. Oracle WebLogic Server is a large, business-grade web server: companies use it to run their web applications, especially Java applications. Java is a programming language, and WebLogic is built to run Java code. MTN used it on a host named raebilling.mtn.co.za.
What a CVE is
When someone finds a security flaw in widely used software, it is usually written up in a public catalogue so that everyone can track it. Each entry gets an identifier of the form CVE-year-number. CVE-2017-10271 is one such entry: a flaw reported in 2017 in Oracle software. The report quotes the official description, which says the flaw lives in the Oracle WebLogic Server component of Oracle Fusion Middleware, in a subcomponent called WLS Security. The affected versions listed are 10.3.6.0.0, 12.1.3.0.0, 12.2.1.1.0 and 12.2.1.2.0. The description also says the flaw is easily exploitable by an unauthenticated attacker with network access via T3, and that a successful attack can result in takeover of the server.
A few of those words need unpacking:
- Unauthenticated means the attacker does not need a username, password or any other proof of identity. The server does the dangerous thing before it ever asks who you are.
- Network access means the attacker only needs to be able to reach the server over the network, for example over the internet.
- T3 is a network protocol that WebLogic uses for communication between its own parts. Think of it as a private language the server speaks with its neighbours.
- Takeover means the attacker ends up in control of the server, not just one page on it.
What the vulnerable feature does
WebLogic includes a feature called Web Services Atomic Transaction, or WS-AT. Its job is to coordinate transactions between separate web services: if several services all need to succeed or all need to fail together, WS-AT keeps them in step. A comparison from everyday life is a group booking: either everyone's seat is confirmed or nobody's is, and someone has to coordinate that. The coordinator is reachable on the server under a URL path beginning with /wls-wsat/.
What the bug class means
The flaw is classed as OS command injection. "OS" stands for operating system, the underlying software (such as Linux or Windows) that runs on the machine. Command injection means the attacker can slip their own instructions into a place where the server expected only data, and the server then carries them out. The everyday comparison is a form that asks for your name and then prints "Hello, your name". If you type a name that includes an extra instruction, and the program blindly follows it, you have injected a command.
Setting up
No account, password or role was needed; the quoted CVE description says the flaw is exploitable by an unauthenticated attacker. The only tool the researcher names is Burp Suite, a program used to capture and edit web requests by hand. The researcher sent the request to the host and received the delayed response.
Finding it
The researcher noticed that raebilling.mtn.co.za was running an outdated Oracle WebLogic instance and recognised it as a candidate for CVE-2017-10271. The researcher identified the host as running an outdated Oracle WebLogic instance.
Proving it
Step 1: Send a SOAP request to the WS-AT endpoint
A SOAP message is a way of packaging a request as XML, a text format built from tags in angle brackets. SOAP messages have a standard shape: an envelope, an optional header, and a body. The researcher sent a POST request (the HTTP method used to submit data to a server) to the coordinator endpoint, with a SOAP envelope whose header carries a work:WorkContext element. Inside that element, a java.beans.XMLDecoder object creates a java.lang.Thread and calls its sleep method with the value 40000.
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1
Host: raebilling.mtn.co.za
Content-Length: 426
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>40000</long>
</object>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
Line by line:
POST /wls-wsat/RegistrationPortTypeRPC HTTP/1.1is the request line. POST is the method, the path is one of the WS-AT coordinator servlets, and HTTP/1.1 is the version of the web protocol being used. The researcher also refers to/wls-wsat/CoordinatorPortTypeas the endpoint that triggers the behaviour.Host: raebilling.mtn.co.zanames the server the request is addressed to. One physical server can host many sites, so the request has to say which one it wants.Content-Length: 426states how many bytes long the body of the request is, so the server knows where the message ends.content-type: text/xmltells the server to treat the body as XML and parse it accordingly. This is the switch that sends the text into the XML handling code.Accept-Encoding: gzip, deflate, compressandAccept: */*say the client can accept compressed responses and any content type. They are ordinary browser-style headers and play no part in the attack.- The blank line separates the headers from the body. Everything after it is the SOAP message.
<soapenv:Envelope ...>opens the SOAP envelope and declares thesoapenvprefix, which is just a shorthand for the standard SOAP namespace (a namespace is a way of keeping tag names unique across different vocabularies).<soapenv:Header>opens the header section, the part of a SOAP message meant for metadata rather than the main request.<work:WorkContext ...>opens the field that WebLogic will deserialise, with theworkprefix declared for the WS-AT vocabulary.<java class="java.beans.XMLDecoder">names the Java class that will do the rebuilding. XMLDecoder reads XML and produces live Java objects from it.<object class="java.lang.Thread" method="sleep">asks for an object of classjava.lang.Thread, which in Java represents a thread of execution, and names the methodsleepto call on it. Sleeping a thread means pausing it for a given time.<long>40000</long>is the argument to that method: a long integer, here 40000. Java'sThread.sleeptakes milliseconds, so 40000 means forty seconds.- The closing tags shut each element in turn, and
<soapenv:Body/>is an empty body, written as a self-closing tag. Keeping the body empty and well formed means the envelope is valid; the payload lives entirely in the header.
Step 2: Observe the delay
The researcher states that the request triggers a sleep of 15 seconds, and that the same applies for 20 seconds and 40 seconds. The three screenshots are the proof of concept.



The report shows the request triggering a sleep of 15, 20 and 40 seconds. The report shows only the timing behaviour, not command output or a shell.
Why it works
The report does not analyse the server-side code.
The report does not analyse the server-side code any further.
Impact
The report states that the vulnerability allows an unauthenticated attacker to perform Remote OS Command Execution: remote because it happens over the network, OS because the commands would run on the server's operating system, and execution because they would actually run. The quoted CVE description adds that a successful attack can result in takeover of the Oracle WebLogic Server. The proof shown is a timing delay, not command output, so the command execution capability is asserted from the vulnerability class rather than demonstrated end to end in the report.
The fix
The suggested remediation is to patch WebLogic to a recent version, which fixes the issue. Patching means installing the vendor's updated release, which contains the corrected code. The report does not say whether the host was patched or how the issue was closed.
Other things worth testing
Notes for anyone hunting this
This kind of bug hides on internet-facing WebLogic instances that expose the /wls-wsat/ path. The researcher demonstrated a delay at three different durations.
Glossary
- API: a defined way for one program to talk to another, like a service counter with set rules for what you can ask and how.
- Authentication: proving who you are, usually with a username and password, before being allowed to do something.
- Burp Suite: a tool for capturing, inspecting and editing web requests by hand.
- Command injection: a flaw where an attacker slips their own instructions into input the server treats as data, and the server carries them out.
- Content-Type: a header that tells the server what kind of data the request body contains, such as XML.
- Coordinator: the part of a system that keeps several participants in step, for example making a group of transactions all succeed or all fail.
- CVE: a public catalogue identifier for a known security flaw, of the form CVE-year-number.
- CVSS: a standard scoring system for the severity of a vulnerability; higher numbers mean more severe.
- Deserialisation: turning stored or transmitted data back into live objects a program can use. If the input is untrusted, this can be dangerous.
- Endpoint: a specific address on a server, made of a path such as
/wls-wsat/..., that accepts requests. - Envelope: the outer wrapper of a SOAP message, containing a header and a body.
- Header (HTTP): extra information sent alongside a request or response, such as the host name or content type.
- Header (SOAP): the optional metadata section inside a SOAP envelope, separate from the main body.
- Host: a named machine on a network, here
raebilling.mtn.co.za. - HTTP: the protocol browsers and servers use to exchange requests and responses.
- Java: a programming language, and the runtime environment that executes it, used heavily by WebLogic.
- Java class: a blueprint in Java that describes objects and the methods that can be called on them.
- Method: an action an object can perform, such as sleeping for a number of milliseconds.
- Millisecond: one thousandth of a second; 40000 milliseconds is forty seconds.
- Namespace: a way of keeping tag or name prefixes unique so different vocabularies do not collide.
- Object: a live instance of a class in a running program, with its own data and behaviour.
- Oracle Fusion Middleware: Oracle's family of business server software, of which WebLogic Server is a part.
- OS (operating system): the base software on a machine, such as Linux or Windows, that runs programs and manages files.
- OS command execution: running instructions on the server's operating system, as opposed to inside a single web application.
- Patch: an update from the software vendor that fixes a known problem.
- POST: the HTTP method used to send data to a server.
- Reconnaissance: the information-gathering phase of security testing, looking at what a target exposes.
- Remote: carried out over a network from another machine, rather than sitting at the target.
- Request: a message a client sends to a server asking it to do something.
- Response: the server's reply to a request.
- Servlet: a Java program that runs inside a server and handles web requests.
- SOAP: a standard way of packaging requests as XML, with an envelope, header and body.
- T3: a network protocol WebLogic uses for communication between its components.
- Takeover: an attacker gaining control of a whole server, not just one page or feature.
- Thread: a single path of execution inside a program; sleeping a thread pauses it.
- Transaction: a group of operations that must all succeed or all fail together.
- Unauthenticated: acting without any login or proof of identity.
- Web server: software that answers requests from browsers and other programs over a network.
- WebLogic Server: Oracle's Java application server, used to run business web applications.
- WS-AT (Web Services Atomic Transaction): a WebLogic feature that coordinates transactions across web services.
- XML: a text format built from tags in angle brackets, used to structure data.
- XMLDecoder: a Java class that rebuilds live objects from XML text; abused here to create objects and call methods.