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

Source: https://junglewise.ai/threats/cve-2024-21908-tinymce-cross-site-scripting-in-schema-validation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-10-22. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/tinymce). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/tinymce/tinymce/security/advisories/GHSA-5h9g-x5rv-25wg](https://github.com/tinymce/tinymce/security/advisories/GHSA-5h9g-x5rv-25wg)
- [https://github.com/tinymce/tinymce](https://github.com/tinymce/tinymce)
- [https://www.tiny.cloud/docs/release-notes/release-notes59/](https://www.tiny.cloud/docs/release-notes/release-notes59/)

## Related threats

- [TinyMCE media plugin stored cross-site scripting](https://junglewise.ai/threats/cve-2026-116675-tinymce-is-an-open-source-rich-text-editor-from-7-9-3-until-7-9)
- [PYSEC-2026-1301 - TinyMCE Cross-Site Scripting (XSS) vulnerability using noneditable_regexp option](https://junglewise.ai/threats/cve-2024-38356-tinymce-cross-site-scripting-in-noneditable-regexp)
- [PYSEC-2026-1302 - TinyMCE Cross-Site Scripting (XSS) vulnerability using noscript elements](https://junglewise.ai/threats/cve-2024-38357-tinymce-cross-site-scripting-in-noscript-element-parsing)
- [PYSEC-2026-632 - Cross-site scripting vulnerability in TinyMCE plugins](https://junglewise.ai/threats/cve-2024-21910-tinymce-cross-site-scripting-in-image-and-link-plugins)
- [Tiny Technologies TinyMCE stored XSS via forged mce:protected comments](https://junglewise.ai/threats/cve-2026-47762-tiny-technologies-tinymce-stored-xss-via-forged-mce-protected)
