Junglewise Threat Intelligence

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

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

Technologies: Tiny Technologies Tinymce. Vendors: npm.

Executive brief

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.

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

Timeline

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

References

Related threats