# CVE-2024-29881: TinyMCE cross-site scripting in SVG handling via object or embed elements

Source: https://junglewise.ai/threats/cve-2024-29881-tinymce-cross-site-scripting-in-svg-handling-via-object-or-embed  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-03-26. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-29881 · Severity: low · CVSS 3.1 · Published 2024-03-26

TinyMCE is a widely used rich-text editor embedded in web applications and content management systems. The vulnerability allows attackers to inject malicious JavaScript through SVG files loaded via object or embed HTML elements, potentially stealing user data or performing unauthorized actions on behalf of users. User interaction is required—the attack occurs when editing content containing a malicious SVG file.

Technologies: [tinymce (npm)](https://junglewise.ai/threats/technologies/tinymce). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2024-29881 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-29881 being exploited in the wild.

**How severe is CVE-2024-29881?** Low severity, with a CVSS score of 3.1, published 26 March 2024.

**Which products and versions are affected?** tinymce (npm) SEMVER:introduced=0,fixed=7.0.0.

**Is there a fix for CVE-2024-29881?** Yes. tinymce (npm): upgrade to 7.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-29881 attacked?** It is attacked over the network.

**Am I affected by CVE-2024-29881?** 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 7.0.0 or later

  ```sh
  npm install tinymce@7.0.0
  ```


## Technical details

The vulnerability is a CWE-79 cross-site scripting (XSS) flaw in TinyMCE's content loading and content inserting code. When a user or attacker-controlled content includes an SVG image referenced via an object or embed HTML element, the SVG content may contain malicious JavaScript that executes within the editor's security context without proper sanitization. The attack requires network access to the editor and user interaction (editing or viewing content). No authentication is required. An attacker can achieve arbitrary JavaScript execution within the editor scope, potentially leading to data exfiltration or unauthorized modifications. The fix was addressed in version 6.8.1 by introducing the convert_unsafe_embeds option, which automatically converts unsafe object and embed elements to safer alternatives (img, video, audio, or iframe based on MIME type). This option is enabled by default in TinyMCE 7.0.0 and later. For versions 6.8.1–6.8.6, users must explicitly enable the option or implement a custom NodeFilter.

## Affected products

- Tiny Technologies TinyMCE < 7.0.0 (all prior versions affected; 6.8.1+ provides workaround via convert_unsafe_embeds option)

## Identifiers

- CVE-2024-29881
- GHSA-5359-pvf2-pw78

## Timeline

- 2024-03-26: disclosed: Advisory GHSA-5359-pvf2-pw78 published
- 2023-11-21: patched: TinyMCE 6.8.1 introduced convert_unsafe_embeds option (mitigation); fix released in commit bcdea2ad
- 2024: patched: TinyMCE 7.0.0 released with convert_unsafe_embeds enabled by default (complete fix)

## References

- [https://github.com/tinymce/tinymce/security/advisories/GHSA-5359-pvf2-pw78](https://github.com/tinymce/tinymce/security/advisories/GHSA-5359-pvf2-pw78)
- [https://github.com/tinymce/tinymce/commit/bcdea2ad14e3c2cea40743fb48c63bba067ae6d1](https://github.com/tinymce/tinymce/commit/bcdea2ad14e3c2cea40743fb48c63bba067ae6d1)
- [https://github.com/tinymce/tinymce](https://github.com/tinymce/tinymce)
- [https://www.tiny.cloud/docs/tinymce/6/6.8.1-release-notes/](https://www.tiny.cloud/docs/tinymce/6/6.8.1-release-notes/)
- [https://www.tiny.cloud/docs/tinymce/7/7.0-release-notes/](https://www.tiny.cloud/docs/tinymce/7/7.0-release-notes/)

## 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)
