Skip to content
RCE Disclosed report Intermediate

[hta3] Remote Code Execution on https://███ via improper access control to SCORM Zip upload/import

A SCORM course upload page lacked proper access control, letting any user upload a course package containing an ASPX file. Because the package was extracted onto the server and the file was referenced in the manifest, the attacker could run commands on the server.

cdl Follow

Originally disclosed on HackerOne

Critical 10.0 View original
  • Triaged in 36 hours
  • Fixed in 16 months
  • Paid in 12 days
  • Disclosed after 18 months

Summary:

There is a Remote Code Execution vulnerability at https://█████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx which allows any user to upload a SCORM course package. Furthermore, an attacker can add an ASPX shell to the SCORM package which will then get extracted onto the server, where the attacker can then execute commands.

Steps To Reproduce:

  1. Visit https://███████/ and log in with the credentials: ██████████
  2. Now download this "malicious" SCORM course package: █████
  3. If you unzip scorm.zip, you will notice this is a valid SCORM package, and you will also notice that I've included an ASPX file in shared/cdlcdlcdl.aspx which runs the whoami command. Notice I also included that file reference in the Scorm Manifest (imsmanifest.xml)
  4. Visit https://████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx, select the ██████ file. Start intercepting in Burp Suite Repeater.
  5. Forward the POST request to /Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx
  6. Now intercept the request to /Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004editmetadata.aspx
  7. Right-Click on it, Hover down to "Do intercept" and click "response to this request" then forward it. (In your web-browser you might be able to just right-click, inspect-element, and search for strCourseId in there but my browser was being funky).
  8. Once you've received the response, search for "strCourseId" and grab it.

For example, you would grab F6BAC72B45D64B34ACB662BB001D8523 out of the following response:

HTML
<a onclick="return&#32;ConfirmBeforeNavigateAway(&#39;Are&#32;you&#32;sure&#32;you&#32;want&#32;to&#32;navigate&#32;away&#32;from&#32;this&#32;page?&#32;\n\nYou&#32;made&#32;changes&#32;that&#32;will&#32;not&#32;be&#32;saved&#32;if&#32;you&#32;continue.&#32;\n\nClick&#32;OK&#32;to&#32;proceed&#32;or&#32;Cancel&#32;to&#32;return&#32;to&#32;the&#32;page.&#39;);" id="ML.BASE.WF.ReuploadCourse" class="WorkflowButton" NavigatingURL="Courseware/SCORM/Management/SCORM2004ReuploadCourse.aspx" ItemId="&lt;IDTable&gt;&lt;strCourseId&gt;F6BAC72B45D64B34ACB662BB001D8523&lt;/strCourseId&gt;&lt;strVersionId&gt;F6BAC72B45D64B34ACB662BB001D8523&lt;/strVersionId&gt;&lt;/IDTable&gt;" href="javascript:__doPostBack(&#39;ML.BASE.WF.ReuploadCourse&#39;,&#39;&#39;)"><span>Course Files</span></a>
  1. Now, visit https://█████/CServer/Courseware/<YOUR_COURSE_ID>/shared/cdlcdlcdl.aspx and you will see the shell executes:

███

Supporting Material/References:

  • https://█████/CServer/Courseware/F6BAC72B45D64B34ACB662BB001D8523/shared/cdlcdlcdl.aspx

Proof-of-Concept Video

█████████

Impact

Critical, an attacker can execute commands on this military server, steal sensitive information, pivot to internal systems, etc.

Best, @cdcl

The original report as published on HackerOne, by cdl. 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

This report describes a remote code execution vulnerability in a web application hosted on a U.S. Department of Defence system. The affected component is a courseware management feature that handles SCORM packages. SCORM (Sharable Content Object Reference Model) is a standard for packaging e-learning content: a course is distributed as a zip archive containing the learning material plus an imsmanifest.xml file that describes the package structure and lists its resources.

The vulnerable endpoint is the SCORM 2004 course upload page:

Text
https://█████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

Normally this page lets an authenticated user upload a SCORM course package, which the server then extracts and serves back to learners under a per-course directory. The researcher found that an ASPX file placed inside the package ends up in a web-accessible directory and is executed by the server.

Setup

  • A valid account on the target application. The report gives the login URL as https://███████/ and supplies credentials, which are omitted here.
  • A SCORM course package prepared by the researcher, containing an ASPX file.
  • Burp Suite, used in Repeater with response interception enabled.
  • A web browser to drive the upload workflow.

No specific product version is given in the report.

Finding it

The researcher identified that the SCORM upload feature extracts the uploaded package's contents onto the server. The extracted files are reachable under /CServer/Courseware/<course id>/, and the ASPX file included in the archive was executed rather than served as inert course material. The package itself remains a valid SCORM package, so nothing about the upload looks malformed to the application.

Exploitation

Step 1: Log in

Visit https://███████/ and authenticate with the supplied credentials.

Step 2: Obtain the malicious package

The researcher prepared a SCORM course package, referred to in the report as scorm.zip. Unzipping it shows a valid SCORM package, with one addition: an ASPX file at shared/cdlcdlcdl.aspx that runs the whoami command. The file is also referenced in the SCORM manifest, imsmanifest.xml, so the package stays internally consistent.

Step 3: Start the upload

Visit the upload page:

Text
https://████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

Select the package file and start intercepting in Burp Suite Repeater.

Step 4: Forward the upload POST

Forward the POST request to:

Text
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

Step 5: Intercept the follow-up request

After the upload, the workflow issues a request to:

Text
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004editmetadata.aspx

Intercept this request as well.

Step 6: Capture the response

Right-click the intercepted request, choose "Do intercept" and then "response to this request", and forward it. The researcher notes that inspecting the page in the browser and searching for strCourseId may also work, but that the browser was behaving oddly at the time.

Step 7: Extract the course identifier

In the response, search for strCourseId. The value is embedded in the ItemId attribute of the reupload link. The report's example response contains:

HTML
<a onclick="return&#32;ConfirmBeforeNavigateAway(&#39;Are&#32;you&#32;sure&#32;you&#32;want&#32;to&#32;navigate&#32;away&#32;from&#32;this&#32;page?&#32;\n\nYou&#32;made&#32;changes&#32;that&#32;will&#32;not&#32;be&#32;saved&#32;if&#32;you&#32;continue.&#32;\n\nClick&#32;OK&#32;to&#32;proceed&#32;or&#32;Cancel&#32;to&#32;return&#32;to&#32;the&#32;page.&#39;);" id="ML.BASE.WF.ReuploadCourse" class="WorkflowButton" NavigatingURL="Courseware/SCORM/Management/SCORM2004ReuploadCourse.aspx" ItemId="&lt;IDTable&gt;&lt;strCourseId&gt;[redacted]&lt;/strCourseId&gt;&lt;strVersionId&gt;[redacted]&lt;/strVersionId&gt;&lt;/IDTable&gt;" href="javascript:__doPostBack(&#39;ML.BASE.WF.ReuploadCourse&#39;,&#39;&#39;)"><span>Course Files</span></a>

From this markup the course identifier is [redacted]. The same value appears as strVersionId in the example. The identifier is used in the URL path to the uploaded file.

Step 8: Request the uploaded shell

With the course identifier in hand, request the ASPX file from the course's extracted directory:

Text
https://█████/CServer/Courseware/<YOUR_COURSE_ID>/shared/cdlcdlcdl.aspx

For the example identifier, the URL is:

Text
https://█████/CServer/Courseware/[redacted]/shared/cdlcdlcdl.aspx

The server executes the file rather than serving it as static content, as shown in the report's screenshot. The report includes a screenshot of the shell executing, and a proof-of-concept video, but neither is reproduced here.

Root cause

The upload feature treats the SCORM archive as trusted content and extracts it into a directory that sits under the application's web root. An ASPX file survives extraction and is then handled by the ASP.NET pipeline like any other page in the application. The identifier is disclosed to the client in the metadata response, and the attacker uses it to address the uploaded file directly.

The report does not describe any server-side validation, content-type filtering or extraction-path restriction that was present and bypassed; the implication is that none was applied to the archive contents.

Impact

The researcher rates this as critical: an attacker with an account on the application can execute arbitrary commands on the server. From there the report lists theft of sensitive information and pivoting to internal systems as realistic follow-on actions. The example payload only runs whoami, but the same mechanism accepts any ASPX content.

The precondition is an authenticated session on the courseware application; the report does not state whether self-registration is possible or how accounts are issued.

Fix

The measures that would address the root cause are to validate the contents of uploaded SCORM archives against an allowlist of expected file types, reject or strip executable extensions such as .aspx, and extract packages to a location outside the web root, or to a directory from which script execution is disabled.

Variants to test

  1. Other archive-based import features. Look for any feature that accepts a zip, jar, war or similar archive and extracts it server-side (theme uploads, plugin installers, report templates, language packs). A positive result is an extracted file with a server-side extension (.aspx, .php, .jsp) that returns its own output when requested by URL.
  2. Extension filter bypasses. Where an allowlist exists, try case variation, trailing dots or spaces, alternate extensions mapped to the same handler, and double extensions. A positive result is a file that passes validation and still executes when requested.
  3. Manifest-driven extraction. Packages like SCORM reference their files in a manifest. Try adding entries to the manifest that point at paths outside the intended directory (for example ../) to see whether extraction follows the manifest rather than the archive's own entry names. A positive result is a file written outside the course directory.
  4. Predictable extraction paths. Check whether the directory name is returned to the client, as strCourseId is here, or can be guessed. A positive result is a stable, client-visible path under the web root where uploaded content can be requested directly.
  5. Direct request to extracted content. Even without code execution, request uploaded files by URL to confirm they are served from the application origin. A positive result is content returned from the course directory without an authorisation check.

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

What happened, in plain words

A security researcher found a way to make a U.S. Department of Defence web server run commands of his choosing. The server hosts an e-learning system: people log in, upload course material, and learners then open those courses in a browser. The upload feature accepted the course package, and the ASPX file inside it was extracted and executed. The researcher put a small program inside a course package, uploaded it through the normal upload page, and then opened that program in his browser. The server ran it and sent back the result. In the report the program only asks the server "who am I?" (the whoami command), but the same trick would let an attacker run any command, read files, or jump to other machines on the network.

The report is rated critical, with a CVSS score of 10.0, the maximum. CVSS is a standard scoring system for how serious a security flaw is; 10.0 means the worst case on every measure. The weakness is classified as code injection: the attacker manages to get his own code executed by the server.

Background you need

What the application is

The target is a web application for managing courseware, that is, digital learning material. The report gives the address of the upload page as:

Text
https://█████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

A URL is the address you type in a browser to reach a page. The part after the host name, here /Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx, is the path of the page on the server. The ending .aspx tells you the page is built with ASP.NET, a Microsoft technology for making websites. On an ASP.NET server, a file ending in .aspx is not just text to be displayed: the server treats it as a program, runs it, and sends back whatever it produces. That single fact is the heart of this report.

What SCORM is

SCORM stands for Sharable Content Object Reference Model. It is a standard way of packing e-learning content so that different learning systems can all open it. A SCORM course is a zip file, the same kind of compressed archive you might make on your own computer, containing the lessons plus a file called imsmanifest.xml. The manifest is a plain text index that lists what is in the package and how the pieces fit together. Think of a zip as a cardboard box and the manifest as the packing list taped to the inside of the lid: it tells the receiving system what should be in the box and where each item goes.

Normally the upload page takes such a box, unpacks it on the server, and serves the contents back to learners from a folder named after the course. The researcher discovered that the unpacking step does not care what kind of files are in the box. If you put a program in the box, the program lands on disk, in a folder the web server will happily serve, and the server runs it when asked.

What remote code execution means

Remote code execution, often shortened to RCE, means an attacker who is far away, sitting at a browser, can make the server run commands. Compare it to a hotel: normally guests can ask the front desk for a room key, but they cannot walk into the back office and use the staff computer. RCE is the equivalent of a guest finding that a form meant for room requests also accepts instructions for the staff computer, and the staff computer obeys them.

What Burp Suite is

Burp Suite is a tool used by security testers. It sits between your browser and the website, like a postal worker who opens every letter going each way. You can pause a request before it reaches the server, read it, change it, and then send it on. "Intercepting" means pausing a message this way. "Repeater" is one part of Burp that lets you send the same request again and again, adjusting it each time. The researcher used it to pause the upload and the page that follows it, so he could read values the server sent back.

Setting up

To repeat the test you need:

  • A valid account on the target application. The report gives the login page as https://███████/ and supplies credentials, which are left out here.
  • A SCORM course package prepared in advance, containing an ASPX file. The report calls it scorm.zip.
  • Burp Suite, with interception of responses switched on.
  • A normal web browser to go through the upload screens.

The report does not name any product version.

How the researcher found it

The researcher noticed that the SCORM upload feature unpacks the uploaded package on the server. The unpacked files are then served from a path under the application's own web address, /CServer/Courseware/<course id>/. The uploaded ASPX file placed there was reachable, and because the server is ASP.NET it was executed rather than shown as text. The package itself is still a perfectly valid SCORM package, so the application sees nothing wrong with the upload.

Carrying out the attack, step by step

Step 1: Log in

Visit https://███████/ and sign in with the supplied credentials. The researcher logged in before reaching the upload page, so an account was needed for the steps shown. The report does not say how accounts are issued or whether anyone can register.

Step 2: Get the malicious package

The researcher prepared a SCORM course package, scorm.zip. If you unzip it, you see a valid SCORM package, with one extra item: a file at shared/cdlcdlcdl.aspx that runs the whoami command. whoami is a standard command that prints the name of the account the server is running as; it is the classic harmless way to prove that you can run commands at all. The file is also listed in the manifest, imsmanifest.xml, so the package stays consistent and does not look broken to the application.

Step 3: Start the upload

Open the upload page:

Text
https://████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

Choose the package file, and switch on interception in Burp Suite Repeater. From this point the browser's messages to the server are paused so the researcher can watch them.

Step 4: Forward the upload request

Forward the POST request to:

Text
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx

A POST request is the way a browser sends data to a server, for example the contents of a form or an uploaded file. Forwarding means letting the paused message continue to the server. This is the moment the zip, with the ASPX file inside, is handed over.

Step 5: Intercept the follow-up request

After the upload, the application automatically sends another request, to:

Text
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004editmetadata.aspx

This is the page where the course's details are edited. The researcher paused this one too, because the reply to it contains a value he needs next.

Step 6: Capture the response

Right-click the paused request, choose "Do intercept" and then "response to this request", and forward it. This tells Burp to also pause the server's reply, so it can be read before the browser sees it. The researcher notes that you might instead right-click in the browser, choose inspect element, and search for strCourseId there, but his browser was behaving oddly at the time.

Step 7: Pull out the course identifier

In the paused reply, search for strCourseId. The value sits inside the ItemId attribute of a link for re-uploading the course. The example reply in the report is:

HTML
<a onclick="return&#32;ConfirmBeforeNavigateAway(&#39;Are&#32;you&#32;sure&#32;you&#32;want&#32;to&#32;navigate&#32;away&#32;from&#32;this&#32;page?&#32;\n\nYou&#32;made&#32;changes&#32;that&#32;will&#32;not&#32;be&#32;saved&#32;if&#32;you&#32;continue.&#32;\n\nClick&#32;OK&#32;to&#32;proceed&#32;or&#32;Cancel&#32;to&#32;return&#32;to&#32;the&#32;page.&#39;);" id="ML.BASE.WF.ReuploadCourse" class="WorkflowButton" NavigatingURL="Courseware/SCORM/Management/SCORM2004ReuploadCourse.aspx" ItemId="&lt;IDTable&gt;&lt;strCourseId&gt;[redacted]&lt;/strCourseId&gt;&lt;strVersionId&gt;[redacted]&lt;/strVersionId&gt;&lt;/IDTable&gt;" href="javascript:__doPostBack(&#39;ML.BASE.WF.ReuploadCourse&#39;,&#39;&#39;)"><span>Course Files</span></a>

Line by line, in plain words:

  • The whole block is one HTML link, an <a> element, the same kind of thing you click on any web page.
  • onclick="return&#32;ConfirmBeforeNavigateAway(...)" is a snippet of JavaScript that runs when the link is clicked. It shows a confirmation box asking whether you really want to leave the page. The &#32; and &#39; pieces are HTML codes for a space and an apostrophe; browsers decode them automatically.
  • id="ML.BASE.WF.ReuploadCourse" is the link's name inside the page, used by the application's own scripts.
  • class="WorkflowButton" says the link should be styled like a button.
  • NavigatingURL="Courseware/SCORM/Management/SCORM2004ReuploadCourse.aspx" records which page the link leads to.
  • ItemId="&lt;IDTable&gt;&lt;strCourseId&gt;[redacted]&lt;/strCourseId&gt;&lt;strVersionId&gt;[redacted]&lt;/strVersionId&gt;&lt;/IDTable&gt;" is the interesting part. The &lt; and &gt; are HTML codes for < and >, so once decoded this is a small piece of XML, a structured text format, holding two values: strCourseId and strVersionId. Both are [redacted] in this example.
  • href="javascript:__doPostBack(...)" is where the link points: a JavaScript call that submits the page, rather than a normal address.
  • <span>Course Files</span> is the visible text of the link.

So the course identifier is [redacted]. This long string of letters and digits is a unique name for the course the researcher just uploaded. The identifier appears in the URL path to the uploaded file. Because the server hands the identifier back to the browser, the attacker knows exactly where his uploaded files landed.

Step 8: Open the uploaded program

With the identifier in hand, request the ASPX file from the course's folder:

Text
https://█████/CServer/Courseware/<YOUR_COURSE_ID>/shared/cdlcdlcdl.aspx

<YOUR_COURSE_ID> is a placeholder: you replace it with the identifier from step 7. For the example identifier, the address is:

Text
https://█████/CServer/Courseware/[redacted]/shared/cdlcdlcdl.aspx

When the browser asks for that address, the server does not hand the file back as plain text. It recognises the .aspx ending, runs the file as a program, and returns whatever the program prints. The program runs whoami, and the report includes a screenshot of the shell executing. The report includes a screenshot of the shell running and a proof-of-concept video, but neither is reproduced here.

Why it works

The upload feature trusts the SCORM archive. It unpacks the archive into a folder that sits under the application's own web address, and the ASPX file inside survived unpacking. An ASPX file therefore survives unpacking and is then handled by the ASP.NET engine like any other page of the application. The identifier is handed to the browser in the metadata reply, so the attacker can go straight to the uploaded file.

Impact

The researcher rates this critical: anyone with an account on the application can run commands on the server. From there, the report lists stealing sensitive information and moving on to internal systems as realistic next steps. The example only runs whoami, but the same mechanism accepts any ASPX content.

The one precondition is a logged-in session on the courseware application.

Fix

The measures that would address the cause are: check the contents of uploaded SCORM archives against a list of allowed file types, reject or strip executable endings such as .aspx, and unpack packages to a place outside the web address, or to a folder where scripts are not run.

Variants to test

  1. Other archive-based import features. Look for any feature that accepts a zip, jar, war or similar archive and unpacks it on the server (theme uploads, plugin installers, report templates, language packs). A positive result is an unpacked file with a server-side ending (.aspx, .php, .jsp) that returns its own output when you request it by address.
  2. Extension filter bypasses. Where an allowlist exists, try changing the case of letters, adding trailing dots or spaces, using other endings that map to the same handler, and double endings. A positive result is a file that passes the check and still runs when requested.
  3. Manifest-driven extraction. Packages like SCORM list their files in a manifest. Try adding entries to the manifest that point outside the intended folder (for example with ../) to see whether unpacking follows the manifest rather than the archive's own file names. A positive result is a file written outside the course folder.
  4. Predictable extraction paths. Check whether the folder name is returned to the browser, as strCourseId is here, or can be guessed. A positive result is a stable, browser-visible path under the web address where uploaded content can be requested directly.
  5. Direct request to extracted content. Even without code execution, request uploaded files by address to confirm they are served from the application's own site. A positive result is content returned from the course folder without an authorisation check.

Glossary

  • API: a defined way for one piece of software to ask another to do something, like a service counter with a fixed list of requests it accepts.
  • ASP.NET: a Microsoft framework for building websites; on such a server, files ending in .aspx are run as programs.
  • ASPX: the file ending used for ASP.NET pages; such a file contains code the server executes.
  • Attribute: a named value inside an HTML tag, such as id="..." or ItemId="...".
  • Burp Suite: a tool that sits between browser and server so a tester can pause, read and change the messages going each way.
  • Code injection: a flaw where an attacker gets his own code run by the target system.
  • Courseware: digital learning material and the software that manages it.
  • CVSS: a standard scoring system for the severity of a security flaw; 10.0 is the maximum.
  • Endpoint: a specific address on a server that accepts requests, such as a particular page or form handler.
  • Extraction: unpacking the contents of an archive such as a zip file onto disk.
  • HTML: the language web pages are written in; it uses tags like <a> for links and attributes for extra information.
  • imsmanifest.xml: the index file inside a SCORM package that lists its contents and structure.
  • Interception: pausing a message between browser and server so it can be inspected or altered.
  • JavaScript: the programming language browsers run to make pages interactive.
  • Manifest: a list file inside a package describing what the package contains.
  • POST request: a message a browser sends to a server carrying data, such as a form or an uploaded file.
  • Remote code execution (RCE): a flaw that lets an attacker far away make the server run commands.
  • Repeater: the part of Burp Suite that lets you resend and adjust the same request repeatedly.
  • Request: a message from browser to server asking for a page or sending data.
  • Response: the server's reply to a request.
  • SCORM: Sharable Content Object Reference Model, a standard for packaging e-learning content as a zip with a manifest.
  • Shell: here, a small uploaded program that lets an attacker run commands on the server.
  • strCourseId: the name of the value in the page that holds the course's unique identifier.
  • URL: the address of a page or file on the web.
  • Web root: the folder on a server whose contents are reachable through the site's web address.
  • whoami: a standard command that prints the name of the account it runs under.
  • XML: a structured text format that stores data in named tags, like <name>value</name>.
  • Zip: a common compressed archive format that bundles several files into one.

More by cdl

View all

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