My First Bug
The profile picture upload accepted SVG files without checking their content, so an uploaded SVG containing script code executed when the image was viewed. An attacker could upload such a file as their avatar and run script in the context of anyone who viewed the profile.
This my first blog so ignore any type of grammer error. In this blog i will explain you how i got my first bug. i found this bug on private domainn so let’c consider this as target.com, let’s begin.
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 upload only relied on weak or missing file type validation and then served the uploaded SVG inline, so script inside it ran in the site's origin.
Impact
Script could run in the browser of anyone who viewed the malicious profile picture, though the report was marked as a duplicate.
What the attacker needed
A user account on the site; ability to set a profile picture
How it was found
- Create a profile on the target site.
- Notice that the profile picture upload does not properly check file extensions.
- Build an SVG file containing script code.
- Upload the SVG as the profile picture.
- The script executes when the uploaded image is rendered.
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.
A website lets you upload a picture for your profile. It did not check what kind of file you sent, so the author sent a drawing file (SVG) that can also carry a small program. When the site showed that picture, the program ran in the viewer's browser, which is called cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.