TinyMCE Cross-Site Scripting (XSS) Vulnerability in Handling External SVG Files

tinymce/tinymce Updated 02 Oct 2025

Summary

26/03/2024
Yes i
Moderate
4.3

CVE-2024-29881: Impact A cross-site scripting (XSS) vulnerability was discovered in TinyMCE’s content loading and content inserting code. Affects tinymce/tinymce versions < 7.0.0. Fixed in 7.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

TinyMCE is a popular open-source WYSIWYG editor used for rich text editing in web applications. It provides a user-friendly interface for creating and editing content. However, a vulnerability has been discovered in TinyMCE's handling of external SVG files through Object or Embed elements.

Vulnerability Detail

The vulnerability in TinyMCE allows for a cross-site scripting (XSS) attack. An attacker can exploit this vulnerability by loading an SVG image through an object or embed element, which can potentially contain a malicious XSS payload. This can lead to unauthorized access, data theft, or other malicious activities.

How To Fix

Minimum fixed version

7.0.0

This is the first release that contains the fix.

composer require tinymce/tinymce:7.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you are using TinyMCE version 6.8.1 or higher, you can set the 'convert_unsafe_embeds' option to true. For earlier versions, a custom NodeFilter can be implemented to remove or modify any object or embed elements. This can be done using the editor.parser.addNodeFilter and editor.serializer.addNodeFilter APIs.

Conclusion

The TinyMCE Cross-Site Scripting (XSS) vulnerability in handling external SVG files through Object or Embed elements can be mitigated by updating to version 7.0.0 or higher and enabling the 'convert_unsafe_embeds' option. It is important to stay up-to-date with security patches and follow best practices to ensure the security of your web applications.

See every vulnerability recorded for tinymce/tinymce →

Share this vulnerability

FAQ

The vulnerability allows for cross-site scripting (XSS) attacks, which can lead to unauthorized access, data theft, or other malicious activities.

To fix this vulnerability, update to TinyMCE version 7.0.0 or higher and enable the 'convert_unsafe_embeds' option.

Yes, if you are using TinyMCE version 6.8.1 or higher, you can set the 'convert_unsafe_embeds' option to true. For earlier versions, a custom NodeFilter can be implemented.

The vulnerability was discovered by Toni Huttunen of Fraktal Oy.

You can refer to the TinyMCE release notes for version 6.8.1 and 7.0.0 for more information about the fix.

How To Fix

Minimum fixed version

7.0.0

This is the first release that contains the fix.

composer require tinymce/tinymce:7.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback