Skip to content
XSS Write-up Intermediate

CVE-2020-13669 – Overview

The FigCaption widget in Drupal Core allowed users with Basic HTML permissions to inject arbitrary attributes and classes into captions, bypassing the intended HTML whitelist. This enabled stored DOM manipulation for page defacement and redirection, and a potential stored XSS via broken widgets, though the latter was limited by browser handling of javascript: URLs.

checkmarx.com

Published on checkmarx.com

As you may recall, back in June, Checkmarx disclosed multiple cross-site scripting (XSS) vulnerabilities impacting Drupal Core, listed as CVE-2020-13663, followed by a more technical breakdown of the findings in late November. Today, we’re releasing details surrounding additional, new vulnerabilities (CVE-2020-13669)…

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 an inconsistency between the HTML attribute whitelists used by CKEditor's general sanitisation and the FigCaption widget's internal sanitisation, plus missing sanitisation in preview mode.

What the attacker needed

Basic HTML content permission; Victim views or edits the crafted content

The fix

The fix applied the restrictive whitelists of Basic HTML mode to the whitelist within the image caption, and the text states the fixes have been released.

How it was found

  1. As a user with Basic HTML content privileges, insert a caption into content using the FigCaption widget.
  2. Switch to the HTML source view and add a payload that injects arbitrary attributes or classes into the caption's HTML.
  3. Submit or render the content; the injected attributes and classes are stored and later rendered.
  4. For defacement, add a class such as joyride-modal-bg to an anchor tag so it covers the whole page and redirects on click.
  5. For the broken widget vector, craft a partial widget using data-* attributes so that when the node is edited again, the widget reads a src value and populates an attribute with a javascript: URL.

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.

Drupal is a content management system. Its editor lets people with limited permissions add captions to images, but the caption feature checked allowed HTML differently from the main editor. This let a low-privileged user sneak in extra styling and attributes, which could cover a page with a fake button that redirects visitors to another site.

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.