{"id":"CVE-2024-21911","aliases":["GHSA-w7jx-j77m-wp65"],"url":"https://o3.security/vulnerability/CVE-2024-21911","summary":"Cross-site scripting vulnerability in TinyMCE","details":"### Impact\nA cross-site scripting (XSS) vulnerability was discovered in the URL sanitization logic of the core parser. The vulnerability allowed arbitrary JavaScript execution when inserting a specially crafted piece of content into the editor using the clipboard or APIs. This impacts all users who are using TinyMCE 5.5.1 or lower.\n\n### Patches\nThis vulnerability has been patched in TinyMCE 5.6.0 by improved URL sanitization logic.\n\n### Workarounds\nTo work around this vulnerability, either:\n- Upgrade to TinyMCE 5.6.0 or higher\n- Manually sanitize `iframe`, `object` and `embed` URL attributes using a [TinyMCE node filter](https://www.tiny.cloud/docs/api/tinymce.html/tinymce.html.domparser/#addnodefilter).\n- Disable `iframe`, `object`, and `embed` elements in your content using the [invalid_elements](https://www.tiny.cloud/docs/configure/content-filtering/#invalid_elements) setting.\n\n#### Example: Sanitizing using a node filter\n```js\neditor.parser.addNodeFilter('iframe,object,embed', function(nodes) {\n  nodes.forEach(function(node) {\n    if (node.attributes) {\n      node.attributes.forEach(function(attr) {\n        var name = attr.name;\n        var value = attr.value;\n        // Sanitize the attribute value here or remove it entirely\n        var sanitizedValue = ...;\n        node.attr(name, santizedValue);\n      });\n    }\n  });\n});\n```\n\n#### Example: Using invalid_elements\n```js\ninvalid_elements: 'iframe,object,embed'\n```\n\n### Acknowledgements\nTiny Technologies would like to thank Aaron Bishop at SecurityMetrics for discovering this vulnerability.\n\n### References\nhttps://www.tiny.cloud/docs/release-notes/release-notes56/#securityfixes\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in the [TinyMCE repo](https://github.com/tinymce/tinymce/issues)\n* Email us at [infosec@tiny.cloud](mailto:infosec@tiny.cloud)","published":"2024-01-03T15:59:00.305Z","modified":"2026-08-12T03:51:17.861611767Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"tinymce","fixedVersion":"5.6.0"},{"ecosystem":"NuGet","name":"TinyMCE","fixedVersion":"5.6.0"},{"ecosystem":"Packagist","name":"tinymce/tinymce","fixedVersion":"5.6.0"}],"fix":null,"references":[{"type":"WEB","url":"https://nuget.org/packages"},{"type":"WEB","url":"https://www.npmjs.com/package/tinymce"},{"type":"WEB","url":"https://www.tiny.cloud/docs/release-notes/release-notes56/#securityfixes"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21911.json"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-w7jx-j77m-wp65"},{"type":"ADVISORY","url":"https://github.com/tinymce/tinymce/security/advisories/GHSA-w7jx-j77m-wp65"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21911"},{"type":"ADVISORY","url":"https://vulncheck.com/advisories/vc-advisory-GHSA-w7jx-j77m-wp65"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:17.861611767Z"}}