{"id":"CVE-2024-21908","aliases":["CVE-2024-21908","GHSA-5h9g-x5rv-25wg"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-site scripting vulnerability in TinyMCE","summary":"TinyMCE versions before 5.9.0 are affected by a stored cross-site scripting vulnerability. An unauthenticated and remote attacker could insert crafted HTML into the editor resulting in arbitrary JavaScript execution in another user's browser.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"TinyMCE versions before 5.9.0 are affected by a stored cross-site scripting vulnerability. An unauthenticated and remote attacker could insert crafted HTML into the editor resulting in arbitrary JavaScript execution in another user's browser.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de TinyMCE anteriores a la 5.9.0 se ven afectadas por una vulnerabilidad de cross site scripting almacenado. Un atacante remoto y no autenticado podría insertar HTML manipulado en el editor, lo que provocaría la ejecución arbitraria de JavaScript en el navegador de otro usuario.","source":"nvd"}],"published":"2021-10-22T16:24:02.000Z","modified":"2026-11-08T13:59:50.839Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver 2.0.0","introduced":"0","fixed":"5.9.0","status":"affected"}],"package":"TinyMCE","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.9.0"}],"ecosystem":"npm","package":"tinymce","purl":"pkg:npm/tinymce","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.9.0"}],"ecosystem":"NuGet","package":"TinyMCE","purl":"pkg:nuget/TinyMCE","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.9.0"}],"ecosystem":"Packagist","package":"tinymce/tinymce","purl":"pkg:composer/tinymce/tinymce","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.9.0"}],"vendor":"tiny","product":"tinymce","cpe":"cpe:2.3:a:tiny:tinymce:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tinymce/tinymce/security/advisories/GHSA-5h9g-x5rv-25wg","tags":["exploit","third-party-advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.tiny.cloud/docs/release-notes/release-notes59/#securityfixes","tags":["related","release-notes","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/advisories/GHSA-5h9g-x5rv-25wg","tags":["exploit","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://vulncheck.com/advisories/vc-advisory-GHSA-5h9g-x5rv-25wg","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/tinymce/tinymce","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-01-08T17:08:03.396Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-21908","url":"https://www.cve.org/CVERecord?id=CVE-2024-21908","licence":"CVE Terms of Use","modified":"2026-11-08T13:59:50.839Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5h9g-x5rv-25wg","url":"https://github.com/advisories/GHSA-5h9g-x5rv-25wg","licence":"CC-BY-4.0","modified":"2026-07-08T06:52:56.328Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-21908","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21908","licence":"Public domain","modified":"2026-07-14T23:17:14.113Z"}],"updatedAt":"2026-11-25T22:58:35.908Z","epss":{"score":0.01112,"percentile":0.66891,"date":"2026-12-01T12:00:22.000Z"}}