Cross-site Scripting (XSS) - Reflected in jspark311/buriedunderthenoisefloor
Reported on
Oct 13th 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/jspark311/BuriedUnderTheNoiseFloor/
is vulnerable to XSS as shown below:
Proof of concept
Vuln variable: $_SERVER['PHP_SELF']
Snippet:
<form method='POST' enctype='multipart/form-data' action='<?php echo $_SERVER['PHP_SELF']; ?>'>
Payload
In a browser visit:
http://localhost/BuriedUnderTheNoiseFloor-master/form.php/'%3E%3Cscript%3Ealert%60xss%60%3C/script%3E
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.
References
https://portswigger.net/web-security/cross-site-scripting https://owasp.org/www-community/attacks/xss/
SECURITY.md
2 years ago
This has been fixed by ensuring the PHP execution policy is disable for the upload directory on the webserver.