CVE-2024-29881: Tinymce/tinymce Cross-Site Scripting Vulnerability
MODERATECVE-2024-29881 is a MODERATE (CVSS 4.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Tinymce/tinymce libraries in the Packagist ecosystem. The issue involves tinymce cross-site scripting (xss) vulnerability in handling external svg files through object or embed elements. Remediation is available by upgrading affected packages to version 7.0.0.
CVE-2024-29881 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-29881
To remediate this vulnerability, upgrade all affected Tinymce/tinymce dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade tinymce/tinymce to 7.0.0
npm install tinymce@7.0.0
Upgrade TinyMCE to 7.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for tinymce/tinymce
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-29881, inspect your project dependencies for Tinymce/tinymce:
inspect dependencies for tinymce/tinymce
Analyze the terminal output to locate any version of Tinymce/tinymce in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Tinymce/tinymce, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-29881 Affected Tinymce/tinymce Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tinymce/tinymce
|
Packagist |
< 7.0.0
|
7.0.0
|
|
tinymce
|
npm |
< 7.0.0
|
7.0.0
|
|
TinyMCE
|
NuGet |
< 7.0.0
|
7.0.0
|
References
Frequently Asked Questions
What is CVE-2024-29881?
Which Tinymce/tinymce versions are affected?
What version fixes CVE-2024-29881?
Is tinymce/tinymce affected?
Is tinymce affected?
What is the CVSS score of CVE-2024-29881?
What CWE is associated with CVE-2024-29881?
How can I check Packagist dependencies for CVE-2024-29881?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5359-pvf2-pw78",
"modified" : "2024-03-26T21:23:45Z",
"published" : "2024-03-26T21:23:45Z",
"aliases" : [ "CVE-2024-29881" ],
"summary" : "TinyMCE Cross-Site Scripting (XSS) vulnerability in handling external SVG files through Object or Embed elements",
"details" : "### Impact\nA [cross-site scripting (XSS)](https://owasp.org/www-community/attacks/xss/) vulnerability was discovered in TinyMCE’s content loading and content inserting code. A SVG image could be loaded though an `object` or `embed` element and that image could potentially contain a XSS payload.\n\n### Fix\nTinyMCE 6.8.1 introduced a new `convert_unsafe_embeds` option to automatically convert `object` and `embed` elements respective of their `type` attribute. From TinyMCE 7.0.0 onwards, the `convert_unsafe_embeds` option is enabled by default.\n\n### Workarounds\nIf you are using TinyMCE 6.8.1 or higher, set `convert_unsafe_embeds` to true. For any earlier versions, a custom NodeFilter is recommended to remove or modify any `object` or `embed` elements. This can be added using the `editor.parser.addNodeFilter` and `editor.serializer.addNodeFilter` APIs.\n\n### Acknowledgements\nTiny Technologies would like to thank Toni Huttunen of [Fraktal Oy](https://www.fraktal.fi/) for discovering this vulnerability.\n\n### References\n- [TinyMCE 6.8.1](https://www.tiny.cloud/docs/tinymce/6/6.8.1-release-notes/#new-convert_unsafe_embeds-option-that-controls-whether-object-and-embed-elements-will-be-converted-to-more-restrictive-alternatives-namely-img-for-image-mime-types-video-for-video-mime-types-audio-audio-mime-types-or-iframe-for-other-or-unspecified-mime-types)\n- [TinyMCE 7.0.0](https://www.tiny.cloud/docs/tinymce/7/7.0-release-notes/#convert_unsafe_embeds-editor-option-is-now-defaulted-to-true)\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "tinymce/tinymce"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "tinymce"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "TinyMCE"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tinymce/tinymce/security/advisories/GHSA-5359-pvf2-pw78"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29881"
}, {
"type" : "WEB",
"url" : "https://github.com/tinymce/tinymce/commit/bcdea2ad14e3c2cea40743fb48c63bba067ae6d1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tinymce/tinymce"
}, {
"type" : "WEB",
"url" : "https://www.tiny.cloud/docs/tinymce/6/6.8.1-release-notes/#new-convert_unsafe_embeds-option-that-controls-whether-object-and-embed-elements-will-be-converted-to-more-restrictive-alternatives-namely-img-for-image-mime-types-video-for-video-mime-types-audio-audio-mime-types-or-iframe-for-other-or-unspecified-mime-types"
}, {
"type" : "WEB",
"url" : "https://www.tiny.cloud/docs/tinymce/7/7.0-release-notes/#convert_unsafe_embeds-editor-option-is-now-defaulted-to-true"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-26T21:23:45Z",
"nvd_published_at" : "2024-03-26T14:15:09Z"
}
}