Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] XSS in reports_js.php #1494

Open
seongil-wi opened this issue Sep 9, 2021 · 0 comments
Open

[Security] XSS in reports_js.php #1494

seongil-wi opened this issue Sep 9, 2021 · 0 comments

Comments

@seongil-wi
Copy link

Describe the bug
Reflected Cross-Site Scripting (XSS) may allow an attacker to execute JavaScript code in the context of the victim’s browser. This may lead to unauthorised actions being performed, unauthorised access to data, stealing of session information, denial of service, etc. An attacker needs to coerce a user into visiting a link with the XSS payload to be properly exploited against a victim.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the page with following parameter: http://[localhost]/Ushahidi_Web/reports?filterParams=%7B%22page%22%3Anull%2C%22from%22%3A%222021-09-01%22%2C%22to%22%3A%222021-09-01%22%7D%27);alert(%271
  2. Boom!

Screenshots

  • Attack result
    캡처

Where the Issue Occurred
The code below displays the user-controlled parameter filterParams without sufficient sanitization:

urlParameters = JSON.parse('<?php echo $_GET['filterParams']; ?>');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant