"From Legit to Lure: Transforming a Website into an Amazon Phishing Site"
A website allowed users to upload SVG files that could contain JavaScript, and when the uploaded file was opened, the script executed in the context of the site. An attacker could use this to steal cookies or display a fake login page to capture credentials.
In this blog, I’m concealing the website’s identity due to its Vulnerability Disclosure Policy (VDP). That’s why I’ve used “example.com” as a reference.
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
Impact
An attacker could steal cookies and login credentials from users who view the malicious SVG, and could display a phishing page to capture credentials.
What the attacker needed
Ability to upload files; victim opens the uploaded file
How it was found
- Upload an SVG file containing an XSS payload to the website's file upload feature.
- Open the uploaded image in a new tab to trigger the script.
- Observe the popup confirming script execution.
- Copy the URL of the uploaded image and open it in a different browser to confirm the stored XSS.
- Use a tool to generate a phishing page and inject the XSS payload to display it.
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 a website lets you upload a file, it should check what kind of file it is. Here, the site accepted an SVG image that contained a small script. When someone opened that image, the script ran as if it were part of the website, letting the attacker show fake content or read the user's cookies.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.