You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Admin users could upload SVG images through the profile page, which leads to self and stored XSS(if another user access their profile)
Details
So the backend doesn't really stop us from uploading svg images even if the UI shows the error
in backend/src/middlewares/uploadMiddleware/utils/LocalfileFilter.js
Describe the bug
Admin users could upload SVG images through the profile page, which leads to self and stored XSS(if another user access their profile)
Details
So the backend doesn't really stop us from uploading svg images even if the UI shows the error
in
backend/src/middlewares/uploadMiddleware/utils/LocalfileFilter.jsThis check allows any MIME type starting with image/, including image/svg+xml.
Upload Endpoints:
PATCH /api/admin/profile/update- Admin profile photoPATCH /api/setting/upload/:settingKey- Company logo/settingsTo Reproduce
Steps to reproduce the behavior:
XSS-POC.mp4
Expected behavior
Desktop (please complete the following information):