File upload XSS (Java applet) on http://slackatwork.com/
The site allowed uploading a Java applet file with a .class extension, which was stored and served from a predictable upload path. An attacker could host a malicious applet there and, because browsers trust applets from the same site, execute active content to steal session cookies or alter page content.
- Triaged in 10 hours
- Fixed in 2 days
- Paid in 2 days
- Disclosed after 7 days
The web application supports file uploads and I was able to upload a Java Applet (.class/.jar) file. If a web browser loads a Java applet from a trusted site, the browser provides no security warning. If an attacker can upload a CLASS/JAR file with an applet, the file is executed even if the web page, which embeds the applet is located on a different site. An attacker could use a file upload function to build an XSS attack using active content.
The impact of this vulnerability Malicious users may inject JavaScript, VBScript, ActiveX, HTML or Flash into a vulnerable application to fool a user in order to gather data from them. An attacker can steal the session cookie and take over the account, impersonating the user. It is also possible to modify the content of the page presented to the user.
Here is the link of the file i was able to upload with class extension:-
Successfully uploaded file Applet3863.class with content type image/jpeg.
The file is available at: http://slackatwork.com/wp-content/uploads/job-manager-uploads/company_logo/2015/11/Applet3863.class.
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 feature checked only the declared content type (image/jpeg) and not the actual file content or extension, so executable Java class files were stored and served from the site.
Impact
An attacker could steal a victim's session cookie and take over their account, or modify the page content shown to the user.
What the attacker needed
Access to the file upload feature; victim loads the uploaded applet
How it was found
- Use the file upload function to submit a Java class or jar file.
- The upload is accepted even though the content type is declared as an image.
- The uploaded file is stored at a predictable path under the site's uploads directory.
- An attacker can then reference that stored applet from a page to run active content in a victim's browser.
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 Java applet is a small program that a browser can run. The site let people upload files, and it accepted a program file even though it was disguised as an image. Because the file sat on the site's own address, a browser would run it without warning, letting an attacker take over a logged-in user's session.
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.