Cross-site Scripting (XSS) - Reflected in pheditor/pheditor

Valid

Reported on

Sep 14th 2021


Description

Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into websites. An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script.

https://github.com/pheditor/pheditor/ is vulnerable to XSS as shown below:

Proof of Concept

Variable: $_SERVER['PHP_SELF']
Snippet:

return node.id == "#" ? "<?= $_SERVER['PHP_SELF'] ?>?path=" : "<?= $_SERVER['PHP_SELF'] ?>?path=" + node.a_attr["data-dir"];

Login in phpeditor
Visit the following URL:

http://localhost/pheditor-2/pheditor.php/%3Cscript%3Ealert%60xss%60%3C/script%3E

Observe the XSS

Impact

Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page.

Z-Old
2 years ago

Admin


Hey hitisec, I've emailed the maintainers for you.

We have contacted a member of the pheditor team and are waiting to hear back 2 years ago
pheditor/pheditor maintainer validated this vulnerability 2 years ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
pheditor/pheditor maintainer marked this as fixed with commit 69a79e 2 years ago
The fix bounty has been dropped
This vulnerability will not receive a CVE
to join this conversation