Skip to content
RCE Disclosed report Intermediate CVE-2017-11317CVE-2019-18935

Remote Code Execution via CVE-2019-18935

The Telerik UI file upload handler was vulnerable to CVE-2017-11317 and CVE-2019-18935, allowing an attacker to upload arbitrary files and achieve remote code execution. The reporter demonstrated the vulnerability by uploading a test file and causing a server delay, proving the potential for full system compromise.

z32 Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 10 hours
  • Fixed in 32 days
  • Disclosed after 42 days

Summary: The website at https://█████████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau is vulnerable to CVE-2017-11317 and CVE-2019-18935, allowing an attacker to upload arbitrary files and gain remote code execution on the underlying system.

Step-by-step Reproduction Instructions

  1. Browse to https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau. You will see the following message confirming that the file upload handler is registered:

{ "message" : "RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly." } 2. From here on out I used the write-up at https://labs.bishopfox.com/tech-blog/cve-2019-18935-remote-code-execution-in-telerik-ui for reference. 3. With a slight modification to the script in the BishopFox write-up, I was able to determine the software version:

echo 'test' > testfile.txt
for VERSION in $(cat versions.txt); do
            echo -n "$VERSION: "
                python3 RAU_crypto.py -P 'C:\Windows\Temp' "$VERSION" testfile.txt https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau 2>/dev/null | grep fileInfo || echo
        done

The versions.txt file I used has been attached to this report for ease of replication. 4. As shown in the results, the version is vulnerable to CVE-2017-11317 and I was able to successfully upload the testfile.txt.

██████████ 5. Next, on a Windows system with Visual Studio installed, compile a dll using build_dll.bat as shown in the BishopFox article. 6. Using python3 CVE-2019-18935.py -u https://████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau -v 2016.2.607 -f 'C:\Windows\Temp' -p <your_created_dll>.dll, if you compiled using the PoC in the article you should be able to make the server hang for around 10 seconds. 7. Once the sleep is over, the server should respond with a similar message as follows: [*] Response time: 12.34 seconds showing the server is vulnerable to CVE-2019-18935. 8. At this point you can upload a reverse shell payload, but I feel the sleep PoC is good enough to prove RCE.

Product, Version, and Configuration (If applicable)

Telerik UI 2016.2.607

References

https://labs.bishopfox.com/tech-blog/cve-2019-18935-remote-code-execution-in-telerik-ui https://github.com/bao7uo/RAU_crypto https://github.com/noperator/CVE-2019-18935 https://hackerone.com/reports/838196

Suggested Mitigation/Remediation Actions

Follow recommended fix actions at https://www.telerik.com/support/kb/aspnet-ajax/details/allows-javascriptserializer-deserialization

Impact

Remote Code Execution/Total system compromise.

The original report as published on HackerOne, by z32. 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. 5 min read.

Context

The target was a U.S. Department of Defence website exposing a Telerik UI file upload handler at the following path:

Text
https://█████████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau

Telerik.Web.UI.WebResource.axd is the HTTP handler that serves Telerik UI for ASP.NET AJAX resources. The type=rau parameter selects the RadAsyncUpload (RAU) handler, the component that handles asynchronous file uploads for the RadAsyncUpload control. Because that handler accepts files and processes serialised metadata about them, it is the entry point for the two vulnerabilities discussed here: CVE-2017-11317 and CVE-2019-18935.

The researcher reported the issue against Telerik UI 2016.2.607 and rated the impact as remote code execution and total system compromise.

Setup

The work needed a few pieces:

  1. A reachable instance of the RadAsyncUpload handler, confirmed by browsing to the URL above.
  2. The BishopFox write-up on CVE-2019-18935 as a reference, plus the associated proof-of-concept scripts.
  3. RAU_crypto.py from the bao7uo/RAU_crypto repository, used to encrypt upload requests for a given Telerik version.
  4. CVE-2019-18935.py from the noperator/CVE-2019-18935 repository, used to send the deserialisation payload.
  5. A versions.txt file listing candidate Telerik versions, attached to the report for replication.
  6. A Windows system with Visual Studio installed, to compile the payload DLL with build_dll.bat as described in the BishopFox article.

No credentials or special roles are mentioned; the handler was reachable directly.

Finding it

Browsing to the handler URL returned a JSON message confirming that the upload handler was registered:

Text
{ "message" : "RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly." }

That message is the signal that the RadAsyncUpload endpoint is live. From there the researcher followed the BishopFox write-up and adapted its script slightly to fingerprint the exact Telerik version, because the encryption used by the upload handler is version dependent.

Exploitation

Step 1: Confirm the handler is present

Request the handler directly:

Text
https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau

The type=rau value selects the RadAsyncUpload handler. The JSON response quoted above confirms registration. The message itself says the handler may not be accessed directly, but the endpoint still answers and processes upload traffic.

Step 2: Fingerprint the version

The researcher created a small test file and looped over candidate versions, calling RAU_crypto.py for each one and looking for a fileInfo response:

Bash
echo 'test' > testfile.txt
for VERSION in $(cat versions.txt); do
            echo -n "$VERSION: "
                python3 RAU_crypto.py -P 'C:\Windows\Temp' "$VERSION" testfile.txt https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau 2>/dev/null | grep fileInfo || echo
        done

Each iteration passes the candidate version, the target upload directory C:\Windows\Temp, the local test file and the handler URL to RAU_crypto.py. A version whose encryption matches the server produces a response containing fileInfo, which is the upload metadata returned by the handler. The results showed the version was vulnerable to CVE-2017-11317 and the upload of testfile.txt succeeded.

Step 3: Build the payload DLL

On a Windows machine with Visual Studio installed, the researcher compiled a DLL using build_dll.bat, following the BishopFox article. The DLL is the object that gets deserialised on the server; the article's PoC DLL performs a sleep so that the vulnerability can be demonstrated without running a full shell.

Step 4: Trigger deserialisation and measure the delay

The compiled DLL was sent with the CVE-2019-18935 script:

Bash
python3 CVE-2019-18935.py -u https://████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau -v 2016.2.607 -f 'C:\Windows\Temp' -p <your_created_dll>.dll

The options set the handler URL (-u), the Telerik version used for encryption (-v 2016.2.607), the server-side upload directory (-f 'C:\Windows\Temp') and the local DLL to upload (-p). With the PoC DLL from the article, the server hangs for around ten seconds while the deserialised code sleeps.

Step 5: Confirm the response

After the sleep, the script reports the response time, for example:

Text
[*] Response time: 12.34 seconds

A response time in that range, rather than an immediate error, shows that code from the uploaded DLL executed on the server, which is the proof for CVE-2019-18935. The researcher notes that a reverse shell payload could be uploaded at this point but considered the sleep PoC sufficient to prove RCE.

Root cause

RadAsyncUpload accepts file uploads together with serialised metadata. CVE-2017-11317 covers weaknesses in that upload handling that allow arbitrary files to be uploaded. CVE-2019-18935 is a deserialisation flaw: the handler deserialises attacker-supplied data with JavaScriptSerializer, and a crafted payload causes code in an uploaded assembly to run. The two combine: the first gets a file onto disk, the second executes it.

The server ran an affected Telerik UI version, 2016.2.607. The registration message shows the handler was enabled and answering, so nothing in the deployment blocked direct access to it.

Impact

According to the report, the issue allows remote code execution and total system compromise. The researcher demonstrated arbitrary file upload and code execution through a timing side channel rather than a full shell, and states that a reverse shell payload could be uploaded instead. The impact applies to the underlying system hosting the vulnerable Telerik UI instance.

Fix

The report points to Telerik's guidance for the JavaScriptSerializer deserialisation issue:

Text
https://www.telerik.com/support/kb/aspnet-ajax/details/allows-javascriptserializer-deserialization

The recommendation is to follow the fix actions in that article. The report points to Telerik's guidance and recommends following the fix actions in that article.

Variants to test

  1. Request Telerik.Web.UI.WebResource.axd?type=rau on any ASP.NET site using Telerik UI. A JSON message saying the RadAsyncUpload handler is registered means the endpoint is live and worth fingerprinting.
  2. Run the version loop with RAU_crypto.py against candidate versions. A response containing fileInfo for a given version identifies the build and shows that uploads are accepted.
  3. Upload a harmless test file to a writable directory such as C:\Windows\Temp. A successful fileInfo response confirms CVE-2017-11317 style arbitrary file upload.
  4. Send the sleep DLL with CVE-2019-18935.py using the fingerprinted version. A response time of roughly ten seconds or more, instead of an immediate error, indicates code execution through deserialisation.

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. 14 min read.

What happened, in plain words

A security researcher found that a website belonging to the U.S. Department of Defence was running an old, vulnerable piece of software called Telerik UI. Telerik UI is a toolkit that programmers use to build websites on Microsoft's ASP.NET platform. One of its parts, RadAsyncUpload, lets a website accept files that visitors upload, such as a profile picture or a document, without reloading the whole page.

The problem is that this file-upload part had two known bugs, each with a public identifier: CVE-2017-11317 and CVE-2019-18935. The first bug lets an attacker upload files of their choosing to the server. The second bug lets an attacker make the server run code hidden inside such a file. Put together, the two bugs mean an outsider can run their own programs on the server, which is called remote code execution, or RCE. That is about as serious as a web bug gets: the attacker effectively controls the machine.

The vulnerable upload handler was reachable directly from the internet. The researcher proved the bug by uploading a harmless test file, then a small program that simply makes the server pause for about ten seconds. That pause is enough to show the server ran the uploaded code, without actually breaking anything.

This article walks through the same steps the researcher took, explaining each idea from scratch along the way.

Background: the pieces involved

Before the steps, a few concepts need explaining, because the rest of the article depends on them.

What a web server and a URL are

When you type an address into your browser, you are asking a computer somewhere (the web server) to send you a page. The address is a URL. The part after the site name, such as /apps/XTRAHome/..., tells the server which resource you want. Some URLs point to ordinary pages; others point to small programs that run on the server and return data rather than a page.

What an HTTP handler is

In ASP.NET, an HTTP handler is a small program attached to a particular URL ending. When a request arrives for that ending, the handler runs and produces the response. Think of it as a specific counter in a large building: the building is the website, and the counter is the handler. You walk up to the counter and it does one specific job.

Telerik.Web.UI.WebResource.axd is the handler that serves resources for Telerik UI for ASP.NET AJAX. The .axd ending is a convention in ASP.NET for these handler endpoints. The type=rau parameter in the URL selects one particular job inside that handler: RadAsyncUpload, the component that handles file uploads.

What asynchronous file upload means

"Asynchronous" here means the upload happens in the background, without the page reloading. You pick a file, the browser sends it to the server separately, and the page stays usable. To manage this, the upload component sends not just the file but also a bundle of information about it: its name, its size, where it should be stored, and so on. That bundle is called metadata, and it is sent in a serialised form, meaning it is converted into a text or byte format that can travel over the network and be reconstructed on the other side.

What deserialisation is, and why it is dangerous

Serialisation is turning an object in memory into a stream of data. Deserialisation is the reverse: turning that stream back into a live object. It is like packing furniture into flat boxes for shipping, then unpacking and reassembling it at the destination.

The danger is that if an attacker controls the packed data, they may be able to make the unpacking process build something the original programmer never intended. In some programming frameworks, certain objects, when reconstructed, automatically run code as part of the process. This is the whole idea behind the vulnerability class called deserialisation of untrusted data. The server trusts the data it receives and rebuilds it without checking whether it is safe.

What a CVE is

CVE stands for Common Vulnerabilities and Exposures. It is a public catalogue where each known security flaw gets a unique number, so that researchers, vendors and defenders around the world can refer to the same bug unambiguously. CVE-2017-11317 and CVE-2019-18935 are two entries in that catalogue, both concerning Telerik UI.

What a DLL is

A DLL (dynamic link library) is a file containing compiled code that a Windows program can load and run. On Windows, programs are often split into a main executable plus several DLLs that provide extra functions. If an attacker can get the server to load and run a DLL they supplied, they have achieved code execution.

What a proof of concept is

A proof of concept (PoC) is a minimal demonstration that a vulnerability is real, without causing harm. Instead of deploying a full attack, the researcher uses the smallest action that proves the point. Here, the PoC DLL simply makes the server sleep for a few seconds. If the server pauses, the code ran.

What a reverse shell is

A reverse shell is a program that connects from the victim machine back to the attacker and gives the attacker a command prompt on that machine. It is the usual next step after code execution, but it is intrusive, so the researcher chose not to use one here.

The target

The researcher reported the issue against a U.S. Department of Defence website that exposed a Telerik UI file upload handler at this path:

Text
https://█████████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau

Reading that URL piece by piece:

  • https:// means the connection is encrypted with TLS, the same padlock you see in a browser.
  • The host name is redacted in the public report.
  • /apps/XTRAHome/ is the folder path of the application on the server.
  • Telerik.Web.UI.WebResource.axd is the handler file, as explained above.
  • ?type=rau is a parameter passed to the handler. rau stands for RadAsyncUpload, so this tells the handler to use the file-upload component.

Because that handler accepts files and processes serialised metadata about them, it is the entry point for both vulnerabilities. The researcher rated the impact as remote code execution and total system compromise.

What the researcher needed

To reproduce the work, the researcher used a handful of tools and files:

  1. A reachable instance of the RadAsyncUpload handler, confirmed by browsing to the URL above.
  2. The BishopFox write-up on CVE-2019-18935 as a reference, plus the proof-of-concept scripts published with it.
  3. RAU_crypto.py from the bao7uo/RAU_crypto repository, used to encrypt upload requests for a given Telerik version.
  4. CVE-2019-18935.py from the noperator/CVE-2019-18935 repository, used to send the deserialisation payload.
  5. A versions.txt file listing candidate Telerik versions, attached to the report for replication.
  6. A Windows system with Visual Studio installed, to compile the payload DLL with build_dll.bat as described in the BishopFox article.

A note on the encryption: the upload handler does not accept plain upload requests. It expects them to be encrypted in a way that depends on the exact Telerik version. That is why the researcher had to identify the version before sending anything meaningful. It is like a lock whose key changes with each model of the product.

No credentials or special roles are mentioned; the handler was reachable directly.

Finding it

Browsing to the handler URL returned a JSON message confirming that the upload handler was registered:

Text
{ "message" : "RadAsyncUpload handler is registered succesfully, however, it may not be accessed directly." }

JSON is a simple text format for structured data, made of names and values in curly braces. Here the name is message and the value is the sentence inside the quotes.

That message is the signal that the RadAsyncUpload endpoint is live. The wording says the handler may not be accessed directly, but the endpoint still answers and processes upload traffic. In other words, the sign on the door says "staff only", yet the door is unlocked.

From there the researcher followed the BishopFox write-up and adapted its script slightly to fingerprint the exact Telerik version, because the encryption used by the upload handler is version dependent.

Exploitation

Step 1: Confirm the handler is present

Request the handler directly:

Text
https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau

This is the same URL as before. The type=rau value selects the RadAsyncUpload handler. The JSON response quoted above confirms registration. This step matters because it tells the researcher, before any attack, that the component is enabled and answering on the public internet. If the handler had been disabled or blocked, the rest of the work would be pointless.

Step 2: Fingerprint the version

The researcher created a small test file and looped over candidate versions, calling RAU_crypto.py for each one and looking for a fileInfo response:

Bash
echo 'test' > testfile.txt
for VERSION in $(cat versions.txt); do
            echo -n "$VERSION: "
                python3 RAU_crypto.py -P 'C:\Windows\Temp' "$VERSION" testfile.txt https://█████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau 2>/dev/null | grep fileInfo || echo
        done

Line by line:

  • echo 'test' > testfile.txt creates a tiny text file containing the word test. This is the harmless file the researcher will try to upload. Using a harmless file means nothing dangerous happens even if the upload succeeds.
  • for VERSION in $(cat versions.txt); do starts a loop. cat versions.txt prints the contents of a file that lists candidate Telerik version numbers, one per line. The loop runs the following commands once for each version.
  • echo -n "$VERSION: " prints the current version number followed by a colon, without a newline, so the output stays on one line and is easy to read.
  • python3 RAU_crypto.py ... runs the RAU_crypto.py script with Python 3. Its arguments are: -P 'C:\Windows\Temp', the folder on the server where the file should be written; "$VERSION", the candidate version used to encrypt the request; testfile.txt, the local file to upload; and the handler URL. The 2>/dev/null part throws away error messages so the output is not cluttered.
  • | grep fileInfo filters the output and keeps only lines containing the word fileInfo. fileInfo is the upload metadata the handler returns when it accepts a file. If the version is wrong, the encryption will not match and no such line appears.
  • || echo prints an empty line when grep finds nothing, so the output stays aligned.
  • done closes the loop.

Each iteration passes the candidate version, the target upload directory C:\Windows\Temp, the local test file and the handler URL to RAU_crypto.py. A version whose encryption matches the server produces a response containing fileInfo. The results showed the version was vulnerable to CVE-2017-11317 and the upload of testfile.txt succeeded.

Why C:\Windows\Temp? It is a folder on Windows that is normally writable by many processes, so it is a convenient place to drop a file. The double backslashes are just how a backslash is written inside a shell string.

Step 3: Build the payload DLL

On a Windows machine with Visual Studio installed, the researcher compiled a DLL using build_dll.bat, following the BishopFox article. Visual Studio is Microsoft's programming environment; a .bat file is a Windows script that runs a series of commands, in this case the compiler with the right settings.

The DLL is the object that gets deserialised on the server. The article's PoC DLL performs a sleep so that the vulnerability can be demonstrated without running a full shell. In plain terms: the researcher wrote a tiny program whose only job is to wait, packed it as a DLL, and prepared to make the server unpack and run it.

Step 4: Trigger deserialisation and measure the delay

The compiled DLL was sent with the CVE-2019-18935 script:

Bash
python3 CVE-2019-18935.py -u https://████/apps/XTRAHome/Telerik.Web.UI.WebResource.axd?type=rau -v 2016.2.607 -f 'C:\Windows\Temp' -p <your_created_dll>.dll

Line by line:

  • python3 CVE-2019-18935.py runs the exploit script with Python 3.
  • -u https://... sets the URL of the vulnerable handler, the same endpoint as before.
  • -v 2016.2.607 tells the script which Telerik version to use for encryption. This is the version found in step 2; without it the request would not be accepted.
  • -f 'C:\Windows\Temp' sets the server-side folder where the uploaded file is expected to be.
  • -p <your_created_dll>.dll is the path to the local DLL built in step 3. The angle brackets are a placeholder: you replace them with the real file name.

With the PoC DLL from the article, the server hangs for around ten seconds while the deserialised code sleeps. The request is not failing; it is waiting, because the server is busy running the researcher's code.

Step 5: Confirm the response

After the sleep, the script reports the response time, for example:

Text
[*] Response time: 12.34 seconds

A response time in that range, rather than an immediate error, shows that code from the uploaded DLL executed on the server, which is the proof for CVE-2019-18935. This technique is called a timing side channel: instead of reading data back from the server, the researcher measures how long the server takes to answer. A delay that matches the sleep in the DLL is strong evidence that the DLL ran.

The researcher notes that a reverse shell payload could be uploaded at this point but considered the sleep PoC sufficient to prove RCE. That is a responsible choice: the point is proven, and no further damage is done.

Root cause

RadAsyncUpload accepts file uploads together with serialised metadata. CVE-2017-11317 covers weaknesses in that upload handling that allow arbitrary files to be uploaded. CVE-2019-18935 is a deserialisation flaw: the handler deserialises attacker-supplied data with JavaScriptSerializer, a component in ASP.NET that turns JSON text into live objects, and a crafted payload causes code in an uploaded assembly to run.

The two combine: the first gets a file onto disk, the second executes it.

The server ran an affected Telerik UI version, 2016.2.607. The registration message shows the handler was enabled and answering, so nothing in the deployment blocked direct access to it.

Impact

According to the report, the issue allows remote code execution and total system compromise. The researcher demonstrated arbitrary file upload and code execution through a timing side channel rather than a full shell, and states that a reverse shell payload could be uploaded instead. The impact applies to the underlying system hosting the vulnerable Telerik UI instance.

In everyday terms, the report rates the impact as remote code execution and total system compromise.

Fix

The report points to Telerik's guidance for the JavaScriptSerializer deserialisation issue:

Text
https://www.telerik.com/support/kb/aspnet-ajax/details/allows-javascriptserializer-deserialization

The recommendation is to follow the fix actions in that article. The report points to Telerik's guidance and recommends following the fix actions in that article. In practice, that means replacing the old component with a fixed version and following the vendor's configuration advice so the handler no longer accepts untrusted serialised data.

Variants to test

If you are testing a site you are authorised to test, the same approach can be applied more widely:

  1. Request Telerik.Web.UI.WebResource.axd?type=rau on any ASP.NET site using Telerik UI. A JSON message saying the RadAsyncUpload handler is registered means the endpoint is live and worth fingerprinting.
  2. Run the version loop with RAU_crypto.py against candidate versions. A response containing fileInfo for a given version identifies the build and shows that uploads are accepted.
  3. Upload a harmless test file to a writable directory such as C:\Windows\Temp. A successful fileInfo response confirms CVE-2017-11317 style arbitrary file upload.
  4. Send the sleep DLL with CVE-2019-18935.py using the fingerprinted version. A response time of roughly ten seconds or more, instead of an immediate error, indicates code execution through deserialisation.

Glossary

  • API: a defined way for one piece of software to talk to another, like a service counter with a fixed set of requests it accepts.
  • ASP.NET: Microsoft's framework for building websites and web applications.
  • Asynchronous upload: a file upload that happens in the background without reloading the page.
  • CVE: Common Vulnerabilities and Exposures, a public catalogue that gives each known security flaw a unique number.
  • Deserialisation: turning stored or transmitted data back into a live object in memory; dangerous when the data comes from an untrusted source.
  • DLL: dynamic link library, a file of compiled code that a Windows program can load and run.
  • Handler (HTTP handler): a small program in ASP.NET that runs when a request matches a particular URL ending.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • JSON: a simple text format for structured data, made of names and values.
  • Metadata: data about data; here, information about an uploaded file such as its name and destination.
  • Proof of concept (PoC): a minimal, harmless demonstration that a vulnerability is real.
  • RadAsyncUpload (RAU): the Telerik UI component that handles asynchronous file uploads.
  • Remote code execution (RCE): a vulnerability that lets an attacker run their own code on someone else's machine.
  • Reverse shell: a program that connects from a victim machine back to an attacker and gives the attacker a command prompt.
  • Serialisation: turning an object in memory into a stream of data that can be stored or sent.
  • Telerik UI: a commercial toolkit of user-interface components for ASP.NET websites.
  • Timing side channel: learning something about a system by measuring how long it takes to respond, rather than by reading its output.
  • TLS: the encryption that protects HTTPS connections.
  • URL: the address of a resource on the web.
  • Visual Studio: Microsoft's programming environment for writing and compiling code.

More by z32

View all

18 more disclosed reports, 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.