Closed
Description
Describe the bug
A html file can be uploaded with .html.aaa
or .htm.aaa
file extensions. When the file is opened, it executes the Javascript code inside it. On the other hand, file uploading with the .html.
and .htm.
file extensions are enough to execute Javascript for Linux servers. The WinRemoveTailDots
plugin prevents uploading these file extensions using rtrim
function for Windows server.
To Reproduce
- Select arbitrary png file to upload.
- Capture request with Burp and set content as
test<img/src/onerror=alert(document.cookie)>
- Set filename like
test.html.aaa
ortest.htm.aaa
- After forwarding the request, the file is successfully uploaded under the files directory.
Tested on:
- OS: Windows & XAMPP server
- OS: Debian & Apache2
Metadata
Metadata
Assignees
Labels
No labels