GHSA-vg35-5wq7-3x7w
TinyMCE Cross-Site Scripting (XSS) vulnerability using media plugin `data-mce-object` injection
Packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | tinymce | <= 5.10.9 | no fix listed |
| npm | tinymce | >= 6.0.0, < 7.9.3 | 7.9.3 |
| npm | tinymce | >= 8.0.0, < 8.5.1 | 8.5.1 |
| NuGet | TinyMCE | <= 5.10.9 | no fix listed |
| NuGet | TinyMCE | >= 6.0.0, < 7.9.3 | 7.9.3 |
| NuGet | TinyMCE | >= 8.0.0, < 8.5.1 | 8.5.1 |
| Packagist | tinymce/tinymce | <= 5.10.9 | no fix listed |
| Packagist | tinymce/tinymce | >= 6.0.0, < 7.9.3 | 7.9.3 |
| Packagist | tinymce/tinymce | >= 8.0.0, < 8.5.1 | 8.5.1 |
Details
As written in the advisory (Markdown source, shown as plain text).
### Impact
Stored XSS vulnerability in the media plugin. Attackers can inject malicious scripts via crafted `data-mce-*` attributes, which are executed when content is rendered. Impacts users of TinyMCE with the media plugin enabled.
### Patches
This vulnerability has been patched in TinyMCE 8.5.1, TinyMCE 7.9.3 and TinyMCE 5.11.1 LTS by ensuring that, when using the media plugin, any content with `data-mce-object` and `data-mce-p-*` attributes are properly sanitized.
### Workarounds
No official workaround available.
### Fix
To avoid this vulnerability:
- Upgrade to TinyMCE 8.5.1 or higher.
- Upgrade to TinyMCE 7.9.3 or higher.
- Upgrade to TinyMCE 5.11.1 LTS or higher for TinyMCE 5.x (only available as part of commercial [long-term support](https://www.tiny.cloud/long-term-support/) contract).
### Acknowledgements
Tiny thanks [Aymane MAZGUITI](https://github.com/UncleJ4ck) and [Ange Primiterra](https://github.com/ange-primiterra) for their help identifying this vulnerability.
References
External links from the advisory. They lead to third-party sites.