Headline
CVE-2022-1730: Stored XSS on drawio in drawio
Cross-site Scripting (XSS) - Stored in GitHub repository jgraph/drawio prior to 18.0.4.
Sumary
Draw io has a feature to put links on a text, due to a bad sanitization it allows to put javascript:// scheme on a anchor tag which allows to execute javascript code
Steps to reproduce
- Create a text box and set word size to 50
- Click with the rigth button and “Edit link”
- Put asdf://test.com
- Click with the rigth button again and “Edit data”
- On the “link” attribute put javascript:javascript://%0aalert(document.domain)
- Export the page as URL
- Click on the link
Impact
It also affects confluence as its available as an app on the marketplace, POC video: https://youtu.be/RHevZOx1nhc