Skip to content
File upload Disclosed report Beginner

Uploading Plain Text to uber-documents.s3.amazonaws.com Through the Driver Document Upload Page

The driver document upload page only checked file extensions, allowing a plain text file with a .png extension to be uploaded and hosted on an S3 bucket. An attacker could use this to host phishing content that appears to come from Uber's domain.

ddworken Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months

Hi,

When a new driver is registering on Uber, they have to upload a variety of files (proof of insurance, ID, etc). When these files are being uploaded, Uber.com only checks whether the files have the correct extension. This means that one can upload a plain text file with a .png extension and it will be rendered as plain text when viewed in Internet Explorer.

At first I was attempting to get js execution with this (similar to how I did #126197), but that is not possible. When the file extension (.png in our case) and the MIME type (image/png) match, Internet Explorer will not render it as HTML, it is only willing to render it as plain text. This still opens up a possibility of a fishing attach by doing something like this:

https://uber-documents.s3.amazonaws.com/f7e83fb2-a309-4845-a038-8cb3846a0f0d.png?Signature=eQwYlK31HVRqaHN%2FdvaImVEDQuI%3D&Expires=1459110446&AWSAccessKeyId=AKIAIQSUTKT5KJFDBULQ

While this is not as bad as JS execution, I believe that this still qualifies as a vulnerability. In all other image upload forms (e.g. profile picture upload), Uber carefully checks that the image is valid before accepting it and hosting it. In this case, Uber fails to do so.

Thanks, David Dworken

The original report as published on HackerOne, by ddworken. 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 upload validation only checked the file extension and did not verify the file's actual content or MIME type.

Impact

An attacker could host phishing content on a legitimate Uber domain, but JavaScript execution was not possible because Internet Explorer rendered the file as plain text when the extension and MIME type matched.

What the attacker needed

Driver registration process; Internet Explorer to view as text

The fix

Other Uber image upload forms validate the image content; this form should do the same.

How it was found

  1. Go to the driver document upload page during registration.
  2. Upload a plain text file with a .png extension.
  3. The file is accepted and stored on the S3 bucket.
  4. Access the file's URL in Internet Explorer, which renders it as plain text.

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.

When you upload a file, a website should check what the file actually contains, not just its name. Here, the site only looked at the file extension (like .png) and didn't verify the content was a real image. So someone could upload a text file pretending to be an image, and it would be stored on Uber's server and shown as text in some browsers.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by ddworken

View all

18 more disclosed reports, best first.

More from Uber

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.