Disclosed vulnerabilities
Fixed: Dec 11, 2023
CVE-2023-48313 Published: Sep 23, 2024

DOM-XSS in Login Functionality in @umbraco/Umbraco-CMS

4.3 Medium Severity DOM-XSS login umbraco XSS
Raphael Silva Reported by Checkmarx Zero

Summary

The package @umbraco/Umbraco-CMS contains a DOM-based XSS vulnerability in the login functionality. The vulnerability occurs in the login.controller.js file, where a user-supplied returnPath parameter is not properly validated, allowing for the injection of malicious JavaScript. Attackers can exploit this by crafting a URL that triggers XSS once a user logs in, potentially gaining access to elevated privileges if an administrator uses the malicious link. The issue was addressed in Umbraco versions 10.8.1 and 12.3.4 by validating the returnPath parameter.

Product

This vulnerability affects the @umbraco/Umbraco-CMS package from v10.0.0 to v10.8.0 and from v11.0.0 to v12.3.3.

Impact

This vulnerability can lead to the execution of arbitrary JavaScript via a crafted URL, which triggers DOM-based XSS upon login. Attackers can use this to perform actions as logged-in users, including administrators, resulting in potential privilege escalation and even remote code execution.

Steps to reproduce

  1. Install the @umbraco/Umbraco-CMS package.
  2. Navigate to the following crafted URL: <path_to_your_project>/umbraco/#/login/false?mculture=en-US&returnPath=javascript:alert(document.domain).
  3. Upon login, the XSS will trigger, executing the payload in the returnPath parameter.

Expected result:

The XSS is triggered, and an alert displaying the document’s domain is shown.

Remediation

The issue was fixed by ensuring that the returnPath parameter is validated before allowing a redirect. Specifically, the returnPath is now only allowed if it is a valid URL under the same origin, preventing DOM-based XSS and other related vulnerabilities.

A fix was released in the following commit: 4a7ad4a562e7f07641d4a33cd246509f4ab59cd8.

Users are advised to update to Umbraco versions 10.8.1 or 12.3.4, which include this fix.

Credit

This issue was discovered and reported by Checkmarx Security Researcher Raphael Silva.

Resources

  1. Release notes for 10.8.1
  2. Release notes for 12.3.4

Stay connected and never miss a research update!