Harden CKEditor 5 against self-XSS through source editing

Created on 30 September 2022, over 2 years ago
Updated 24 June 2025, 3 days ago

Moving information from https://security.drupal.org/node/177240 where it was determined that this can be handled in public.

Problem/Motivation

There are some edge cases in the CKEditor 5 where it is possible to obfuscate JavaScript in attribute values in a way that prevents CKEditor 5 from detecting them as JavaScript. For example, if CKEditor 5 source editing has been configured to allow <iframe src>, it is possible to self-XSS with <iframe src="jav&#13;ascript:alert(&apos;XSS&apos;);"></iframe> through source editing.

Proposed resolution

This could be tricky to handle on the CKEditor 5 side. A potential solution would be to add a warning for text format when user uses configuration that is known to enable self-XSS.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

ckeditor5.module

Created by

🇫🇮Finland lauriii Finland

Live updates comments and jobs are added and updated live.
  • Security improvements

    It makes Drupal less vulnerable to abuse or misuse. Note, this is the preferred tag, though the Security tag has a large body of issues tagged to it. Do NOT publicly disclose security vulnerabilities; contact the security team instead. Anyone (whether security team or not) can apply this tag to security improvements that do not directly present a vulnerability e.g. hardening an API to add filtering to reduce a common mistake in contributed modules.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024