Skip to content
Open redirect Disclosed report Beginner

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.

w2w Follow

Originally disclosed on HackerOne

  • 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.

  1. Upload svg file in any chat (attached to the report)
  2. Go to open.rocket.chat/file-upload/ID/filename.svg.

PoC: https://open.rocket.chat/file-upload/6ksXL2Mk4MonCcTpx/svgxss.svg

Impact

open redirect

The original report as published on HackerOne, by w2w. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Upload an SVG file in any chat.
  2. 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.

More by w2w

View all

10 more disclosed reports, best first.

More from Rocket.Chat

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.