Disclosed vulnerabilities
Fixed: Feb 6, 2024
CVE-2024-35218 Published: Sep 23, 2024

Stored XSS on Content Page Through Markdown Editor Preview Pane in @umbraco/Umbraco-CMS

4.2 Medium Severity markdown Stored-XSS umbraco XSS
Raphael Silva Reported by Checkmarx Zero

Summary

The package @umbraco/Umbraco-CMS contains a stored XSS vulnerability in the Content page through the Markdown Editor’s preview pane. The vulnerability allows an attacker with Editor permissions to inject arbitrary JavaScript into the markdown content. When an administrator previews or publishes this page, the XSS is triggered, potentially compromising the web application. This can lead to privilege escalation and full compromise of the application. The issue was fixed by introducing HTML sanitization in the preview pane.

Product

This vulnerability affects @umbraco/Umbraco-CMS versions prior to 8.18.13, 10.8.4, 12.3.7 and 13.1.1.

Impact

This vulnerability can lead to the execution of arbitrary JavaScript in the administrator’s browser. A malicious editor can submit a page for review containing injected JavaScript, which when viewed by an administrator, can trigger XSS and result in a full application compromise.

Steps to reproduce

  1. Log in as an Editor and navigate to a Content page with a markdown editor and preview pane enabled.
  2. Inject arbitrary JavaScript into the markdown content.
  3. Submit the page for review.
  4. Log in as an Administrator and preview the page via the following URL:
    /umbraco/#/content/content/edit/<id>.
  5. The XSS is triggered.

Expected result:

The XSS is triggered, and the malicious JavaScript is executed in the administrator’s browser.

Remediation

The issue was fixed by sanitizing HTML content before rendering it in the preview pane of the markdown editor. This prevents stored XSS from being triggered in the administrator’s session.

The fix was applied in the following versions:

  • 8.18.13
  • 10.8.4
  • 12.3.7
  • 13.1.1

Credit

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

Resources

  1. GHSA-gvpc-3pj6-4m9w
  2. CVE-2024-35218
  3. Fix commit 1
  4. Fix commit 2
  5. Fix commit 3
  6. Fix commit 4

Stay connected and never miss a research update!