Stored SVG JavaScript Execution, Redirects & Phishing — Bug Bounty $$
An SVG file uploaded as a profile image could contain external references that made the server fetch a URL, revealing the victim's IP, and could also include a link that redirected the victim to an attacker-controlled site. The author also claims stored JavaScript execution and phishing page hosting, but the text shows the alert ran on the attacker's own domain.
Published on medium.com
leaks victim’s IP, Stored SVG JavaScript Execution, Redirects & Phishing — Bug Bounty $$$
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the image upload only checked that the file was an image and did not sanitise or block active content and external references inside SVG files.
Impact
An attacker could learn a victim's IP address and redirect them to a phishing site, though the JavaScript alert ran on the attacker's own domain rather than the target's.
What the attacker needed
Ability to upload a profile image; victim visits the uploaded image URL
How it was found
- Upload an SVG containing an external image reference to the profile image upload endpoint.
- Navigate to the uploaded image's download URL.
- Observe the request to the external collaborator server.
- Upload an SVG containing a link to an external JavaScript file and click the link.
- Observe the redirect to the external site.
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 write-up has not been written yet. The Original tab links to the source.
When you upload a picture, the website may not fully check what is inside the file. An SVG file is a kind of image that can contain links and instructions for the browser. Here, the site accepted an SVG that pointed to another server, so the server or the victim's browser contacted that server, and a link inside the SVG could send the victim to a fake login page.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.