Trustwave SpiderLabs Security Advisory: TWSL2024-003: Stored Cross-Site Scripting in Multiple REDCap Locations Author: Hamza Hussain & Tim Stamopoulos Published: 07/30/24 Version: 1.0 Vendor: Vanderbilt University Product: REDCap (Research Electronic Data Capture) Version affected: 13.1.9 Product description: REDCap is a secure web application for building and managing online surveys and databases. While REDCap can be used to collect virtually any type of data in any environment (including compliance with 21 CFR Part 11, FISMA, HIPAA, and GDPR), it is specifically geared to support online and offline data capture for research studies and operations. The REDCap application is vulnerable to a cross-site scripting vulnerabilities across different application functions. This will allow an attacker to execute JavaScript code within the victim's browser and, for cookies without the "HttpOnly" attribute set, potentially retrieve some of the cookies used by REDCap. During Trustwave's testing, the REDCap session cookie had the "HttpOnly" attribute set. PoC : *********************************************************** Location 1: Stored XSS in Calendar (CVE-2024-37396) 1. Navigate to the Calendar function on the left-hand side panel under a project. 2. Select a date in the calendar and click on the '+new' button to create an event. 3. Enter an XSS payload into the 'Notes' field, for example: Click Me 4. Observe the payload executed when clicking the "Click Me" button in the calendar event. *********************************************************** Location 2: Stored XSS in Public Survey (CVE-2024-37395) 1. Navigate to the 'Designer' module under a given project and select the default survey instrument. 2. Insert the JavaScript payloads into the Survey Title and Survey Instructions field. Click Me 3. Finish and submit the survey. 4. Navigate to the survey through the generated public link. 4. Observe the payload executed when hitting the 'Click Me' button on the survey. *********************************************************** Location 3: Stored XSS in Project Dashboards (CVE-2024-37394) 1. Navigate to the Project Dashboards module inside a project. 2. Select 'Create New Dashboard' 3. Enter the JavaScript payload into the 'Dashboard title' & 'Dashboard content' text box. For example: Click Me 4. Save the dashboard and navigate to it. Observe as the user can interact with elements on the page to execute the payload. Remediation Steps: Update REDCap to version 14.2.1 or later. Revision History: 05/24/2024 - Vulnerability disclosed 05/24/2024 - Confirmed by vendor 06/07/2024 - CVEs issued 07/30/2024 - Advisory published About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper® cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.