Open redirect open.rocket.chat/file-upload/ID/filename.svg
An uploaded SVG file is served from the application's domain but stored on a cloud bucket, and the SVG can contain JavaScript. An attacker could upload a malicious SVG and trick a victim into visiting its link, causing a redirect to a phishing site or other JavaScript actions.
- Triaged in 15 days
- Fixed in 16 months
- Disclosed after 16 months
Summary: Open redirect through svg file upload
Description: When you upload a file to a chat, the link to it will look like https://open.rocket.chat/file-upload/ID/filename.svg, but the file will be on storage.googleapis.com. We can embed js in our svg and when the victim goes to https://open.rocket.chat/file-upload/6ksXL2Mk4MonCcTpx/svgxss.svg, a redirect to the phishing site will occur, or any other js, for example, downloading the virus, will work. I see you have forbidden downloading html, shtml and php file, I recommend you also prohibit svg, since it is also dangerous.
- Upload svg file in any chat (attached to the report)
- Go to open.rocket.chat/file-upload/ID/filename.svg.
PoC: https://open.rocket.chat/file-upload/6ksXL2Mk4MonCcTpx/svgxss.svg
Impact
open redirect
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 application serves user-uploaded SVG files from its own domain without sanitising or blocking embedded JavaScript, and redirects to the external storage location.
Impact
An attacker could perform an open redirect to a phishing site or execute other JavaScript in the victim's browser.
What the attacker needed
Ability to upload a file to a chat; victim clicks the file link
The fix
The application should also prohibit SVG uploads, as the reporter recommends, or serve them safely.
How it was found
- Upload an SVG file in any chat.
- Visit the generated file-upload link for that SVG.
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.
When you upload a file to a chat, the link looks like it is on the chat's own website, but the file is actually stored elsewhere. Because the file is an SVG (a picture format that can contain code), the code runs as if it were part of the chat site. This lets an attacker send you to a fake login page or run other harmful code.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.