{"id":"CVE-2024-21908","aliases":["GHSA-5h9g-x5rv-25wg"],"url":"https://o3.security/vulnerability/CVE-2024-21908","summary":"Cross-site scripting vulnerability in TinyMCE","details":"### Impact\nA cross-site scripting (XSS) vulnerability was discovered in the schema validation 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 editor APIs. This malicious content could then end up in content published outside the editor, if no server-side sanitization was performed. This impacts all users who are using TinyMCE 5.8.2 or lower.\n\n### Patches\nThis vulnerability has been patched in TinyMCE 5.9.0 by ensuring schema validation was still performed after unwrapping invalid elements.\n\n### Workarounds\nTo work around this vulnerability, either:\n- Upgrade to TinyMCE 5.9.0 or higher\n- Manually sanitize the content using the `BeforeSetContent` event (see below)\n\n#### Example: Manually sanitize content\n```js\neditor.on('BeforeSetContent', function(e) {\n  var sanitizedContent = ...; // Manually sanitize content here\n  e.content = sanitizedContent;\n});\n```\n\n### Acknowledgements\nTiny Technologies would like to thank William Bowling for discovering this vulnerability.\n\n### References\nhttps://www.tiny.cloud/docs/release-notes/release-notes59/#securityfixes\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [infosec@tiny.cloud](mailto:infosec@tiny.cloud)\n* Open an issue in the [TinyMCE repo](https://github.com/tinymce/tinymce/issues)","published":"2024-01-03T15:38:09.664Z","modified":"2026-08-12T03:51:28.938796543Z","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":2,"affectedPackages":[{"ecosystem":"npm","name":"tinymce","fixedVersion":"5.9.0"},{"ecosystem":"NuGet","name":"TinyMCE","fixedVersion":"5.9.0"},{"ecosystem":"Packagist","name":"tinymce/tinymce","fixedVersion":"5.9.0"}],"fix":null,"references":[{"type":"WEB","url":"https://nuget.org/packages"},{"type":"WEB","url":"https://www.tiny.cloud/docs/release-notes/release-notes59/#securityfixes"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21908.json"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-5h9g-x5rv-25wg"},{"type":"ADVISORY","url":"https://github.com/tinymce/tinymce/security/advisories/GHSA-5h9g-x5rv-25wg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21908"},{"type":"ADVISORY","url":"https://vulncheck.com/advisories/vc-advisory-GHSA-5h9g-x5rv-25wg"},{"type":"PACKAGE","url":"https://github.com/tinymce/tinymce"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:28.938796543Z"}}