Skip to content
XSS Write-up Intermediate

CVE-2020-13663 – Overview

A reflected DOM XSS vulnerability existed in Drupal's rejected form handling, where user input was reflected and then processed by CKEditor, allowing script execution. An attacker could hijack user accounts or inject malicious content if a victim with HTML creation permissions interacted with a crafted request.

checkmarx.com

Published on checkmarx.com

Earlier this year, the Checkmarx Security Research Team conducted an investigation of the new version of Drupal Core (Drupal 9) – a content management system (CMS) written in PHP – uncovering several interesting issues whose technical details are worth discussing openly. This article covers the technical facets of…

The author, on checkmarx.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the rejected form error page reflected user input and CKEditor's configuration allowed script tags to bypass its sanitisation by placing them inside an iframe.

Impact

An attacker could hijack user accounts or inject malicious web content such as fake login or payment forms, but only for authenticated users with HTML creation permissions, and CSRF mitigation prevents the form from being successfully submitted.

What the attacker needed

Victim is authenticated; victim has HTML content creation permissions; victim interacts with crafted request

The fix

The vulnerability was fixed by the Drupal security team in updated versions of Drupal Core.

How it was found

  1. An authenticated user with permissions to add a page and use Full HTML mode submits a crafted POST request to a node add or edit endpoint.
  2. The request includes a form_id parameter, a body field value containing malicious code, and forces the format to Full HTML.
  3. CSRF protection causes the form submission to be rejected, and Drupal reflects the submitted content in an error page.
  4. CKEditor processes the reflected content, and the script inside an iframe executes in the user's browser.

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 write-up has not been written yet. The Original tab links to the source.

This is a cross-site scripting (XSS) bug, where a website shows user-supplied content without properly cleaning it, letting an attacker run their own code in a victim's browser. Here, when a form submission was rejected, Drupal displayed the submitted content back to the user, and a text editor component then rendered it in a way that allowed a script hidden inside an iframe to execute. The attacker could then act as the victim, for example by taking over their account.

What is XSS?

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

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.