Authenticated Stored Cross Site Scripting Vulnerability
Opened this issue · 0 comments
c0d3G33k commented
Hi, I have found a stored XSS vulnerability.
Affected Version:
3.0.4 or before
Affected URL:
http://<your_site>/monstra/<page_name.php>
Payload
"><img src=x onerror=prompt(1)>
Steps to replicate:
- Goto http://127.0.0.1/monstra/admin/index.php?id=pages
- Create a new page
- Navigate to title section
- Enter payload as shown in above section
- Visit http://<your_site>/monstra/<page_name.php>.php
- You will triage JavaScript execution
Impacts:
A user with editor level privileges can make JavaScript code execution in admin's session.
Testing Environment:
- Server: Apache 2.4.2
- PHP : 7.1.8
Mitigation:
Pass user input from below mentioned function
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}