{"id":"GHSA-c78w-2gw7-gjv3","summary":"XSS in TinyMCE","details":"### Impact\nA cross-site scripting (XSS) vulnerability was discovered in: the core parser and `media` plugin. The vulnerability allowed arbitrary JavaScript execution when inserting a specially crafted piece of content into the editor via the clipboard or APIs. This impacts all users who are using TinyMCE 4.9.9 or lower and TinyMCE 5.2.1 or lower.\n\n### Patches\nThis vulnerability has been patched in TinyMCE 4.9.10 and 5.2.2 by improved HTML parsing and sanitization logic.\n\n### Workarounds\nThe workarounds available are:\n- disable the media plugin and manually sanitize CDATA content (see below)\nor\n- upgrade to either TinyMCE 4.9.10 or TinyMCE 5.2.2\n\n#### Example: Manually strip CDATA elements\n```js\nsetup: function(editor) {\n  editor.on('PreInit', function() {\n    editor.parser.addNodeFilter('#cdata', function(nodes) {\n      for (var i = 0; i \u003c nodes.length; i++) {\n        nodes[i].remove();\n      }\n    });\n  });\n}\n```\n\n### Acknowledgements\nTiny Technologies would like to thank Michał Bentkowski and [intivesec](https://github.com/intivesec) for discovering these vulnerabilities.\n\n### References\nhttps://www.tiny.cloud/docs/release-notes/release-notes522/#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)","aliases":["CVE-2019-1010091"],"modified":"2023-11-08T04:00:40.663547Z","published":"2020-05-11T20:00:15Z","database_specific":{"cwe_ids":["CWE-79"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-05-11T20:00:00Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/tinymce/tinymce/security/advisories/GHSA-c78w-2gw7-gjv3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-1010091"},{"type":"WEB","url":"https://github.com/tinymce/tinymce/issues/4394"}],"affected":[{"package":{"name":"tinymce","ecosystem":"npm","purl":"pkg:npm/tinymce"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.9.10"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/05/GHSA-c78w-2gw7-gjv3/GHSA-c78w-2gw7-gjv3.json"}},{"package":{"name":"tinymce","ecosystem":"npm","purl":"pkg:npm/tinymce"},"ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0"},{"fixed":"5.2.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/05/GHSA-c78w-2gw7-gjv3/GHSA-c78w-2gw7-gjv3.json"}}],"schema_version":"1.9.0"}