Cross-site Scripting (XSS) - Stored in zhongshaofa/easyadmin
Reported on
Sep 16th 2021
Description
Stored XSS in FileName allows for arbitrary execution of JavaScript
Proof of Concept
At Upload Management
Upload File Image with filename : Sun'><img src=x onerror=alert(1)>set.jpg
Image Upload File
https://user-images.githubusercontent.com/31820707/133646077-b6a14692-fea3-4a37-95e7-eb4c4e6f9073.png
Image XSS Trigger
https://user-images.githubusercontent.com/31820707/133646262-b3cd6b88-90ab-4ba9-be98-c6391cf53d75.png
Impact
If a normal user account can upload this file, then when admin accesses this Upload Management page XSS will be triggered from which attacker can steal admin's cookie.
At present, after uploading files, they will be renamed to MD5 format for saving. This problem should not exist. If they can be reproduced, please provide the reproduction steps