CVE-2024-21908: TinyMCE cross-site scripting in schema validation

CVE-2024-21908 · Severity: low · CVSS 3.1 · Published 2021-10-22

TinyMCE is a widely-used rich text editor component embedded in web applications to allow users to create and edit formatted content. A cross-site scripting (XSS) vulnerability in its core parser allows attackers to inject malicious JavaScript by inserting specially crafted content via clipboard or APIs. If the application lacks server-side sanitization, this malicious code can be published to other users, enabling account compromise, session hijacking, or data theft.

Technologies: tinymce (npm). Vendors: npm.

Quick answers

Is CVE-2024-21908 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-21908 being exploited in the wild.
How severe is CVE-2024-21908?
Low severity, with a CVSS score of 3.1, published 22 October 2021.
Which products and versions are affected?
tinymce (npm) SEMVER:introduced=0,fixed=5.9.0.
Is there a fix for CVE-2024-21908?
Yes. tinymce (npm): upgrade to 5.9.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-21908 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2024-21908?
Check whether you run tinymce (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • tinymce (npm): upgrade to 5.9.0 or later
    npm install tinymce@5.9.0

Technical details

A cross-site scripting vulnerability exists in TinyMCE's schema validation logic within the core parser. The flaw occurs when the parser unwraps invalid elements but fails to re-apply schema validation afterward, allowing malicious JavaScript to bypass security checks. An attacker can exploit this by crafting malicious HTML/JavaScript content and inserting it through the clipboard or editor APIs. User interaction is required (the user must paste or programmatically insert the content). The vulnerability affects TinyMCE versions 5.8.2 and earlier, as well as all version 3 and 4 releases. It has been patched in version 5.9.0 by ensuring schema validation is performed after element unwrapping.

Affected products

  • Tiny Technologies TinyMCE 3.0 through 5.8.2

Identifiers

  • CVE-2024-21908
  • GHSA-5h9g-x5rv-25wg

Timeline

  • 2021-10-21: disclosed
  • 2021-09-15: patched: TinyMCE 5.9.0 released with patch

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.