Reflect Cross Site Scripting when search in thorsten/phpmyfaq
Reported on
Oct 20th 2022
Description
Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites.
Proof of Concept
- Go to your web phpmyfaq and visit http://<ip>/phpmyfaq/index.php?search=
- inject payload to param search: 1af"+onclick='alert(1)'
- Click on field search, you will see the popup XSS (xss executed)
Image Poc Execute: https://drive.google.com/file/d/1VSAqG3MY7uyuXzl1OwrNa-c1g1A0iv2l/view?usp=sharing
Impact
Attacker can execute javascript, steal the cookie.
I cannot reproduce this on my local machine or on the demo:
http://roy.demo.phpmyfaq.de/?search=1af%22+onload=%27alert(1)%27
oh sorry, because my report, edit the payload: 1af"+onload='alert(1)' --> 1af"+onclick='alert(1)'
I still cannot reproduce it. Which version do you use?
i use version 3.1.7, do you click the field search after paste payload ?
you can watch this video poc: https://drive.google.com/file/d/17QaW1bBKVyvDqVEjesFBM9zvLBJbKZVI/view?usp=sharing
(link above die) you can watch this video poc:https://drive.google.com/file/d/18HEsG7azToC1NMoRNWfvX8IMk2-Ycmld/view?usp=sharing
Fix: https://github.com/thorsten/phpMyFAQ/commit/c7904f2236c6c0dd64c2226b90c30af0f7e5a72d