Flash Cross Domain Policy Bypass by Using File Upload and Redirection - only in Chrome
Flash's FileReference upload in Chrome followed redirects and exposed the destination content via the UPLOAD_COMPLETE_DATA event, and with 307/308 redirects it re-sent the upload without checking cross-domain policy. An attacker could read other websites' contents or send file upload requests to them.
Originally disclosed on HackerOne
- Fixed in 24 days
- Paid in 24 days
- Disclosed after 54 days
CVE-2015-0337: https://helpx.adobe.com/security/products/flash-player/apsb15-05.html + https://code.google.com/p/chromium/issues/detail?can=2&start=0&num=100&q=&groupby=&sort=&id=425280
==VULNERABILITY DETAILS== It is possible to bypass Flash Cross Domain policy in Google Chrome to read other websites' contents after a user uploads a file to a destination that redirects the user to the target website. It is also possible to send a file upload request to a target website without checking the cross domain policy by using an open redirect with status code of 307 (or 308). This attack works as follows: 1- The "FileReference" class provides a means to upload file to a target server in ActionScript. 2- It accepts a URL as the destination for the file upload process. 3- It also has access to the target website's contents via the "UPLOAD_COMPLETE_DATA" event. This event is dispatched after data is received from the server after a successful upload. 4- If the target website redirects the user to another website, Flash in Google Chrome follows the redirection and discloses the destination content via the "UPLOAD_COMPLETE_DATA" event (first security issue). Moreover, if the target website redirects the user with status code of 307 (or 308), Google Chrome send the same file upload request to the final destination without checking the cross domain policy (second security issue).
==REPRODUCTION CASE== A SWF PoC file and its ActionScript source has been attached. This SWF file can be hosted on any website to target other websites. http://attacker.com/chromeFileUploadCrossDomain.swf?url=redirect.php?input=https://plus.google.com/u/0/
"redirect.php" is just a simple open redirect to the target URL. An example is as follows: http://attacker.com/chromeFileUploadCrossDomain.swf?url=http://0me.me/demo/openredirect/redirect.php?target=https://plus.google.com/u/0/%26status=301 Note: "0me.me" has an open cross domain policy and that's why we did not need to host it on "attacker.com".
An image has been attached that shows the result of exploiting this vulnerability. Source code of the "redirect.php" file has also been attached just for information.
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
Impact
An attacker could read the contents of other websites and send file upload requests to them without cross-domain policy checks, but only in Chrome and only when a redirect is involved.
What the attacker needed
Victim uses Chrome with Flash; attacker hosts a malicious SWF; target has an open redirect
How it was found
- Host a malicious SWF file on any website.
- Use an open redirect that points to the target website.
- Load the SWF with the redirect URL as the upload destination.
- The SWF uploads a file and receives the redirected content via the UPLOAD_COMPLETE_DATA event.
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.
Flash has a security rule called cross-domain policy that stops one website from reading another's data. This report shows that when a file upload was redirected, Chrome's Flash plugin broke that rule and let the attacker see the response from the final site. It also let the upload request be sent again to a new site without permission.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.