CVE-2024-21908
JSON

6.1medium

Cross-site scripting vulnerability in TinyMCE

Severity
6.1medium CVSS:3.1 by CISA-ADP
Exploit likelihood
1.11% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-5h9g-x5rv-25wg

Description

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.

Affected

Product or packageVersionsReported by
TinyMCEbefore 5.9.0CVE List
tinymce (npm)before 5.9.0GitHub Advisory Database
TinyMCE (NuGet)before 5.9.0GitHub Advisory Database
tinymce/tinymce (Packagist)before 5.9.0GitHub Advisory Database
tiny tinymcebefore 5.9.0NVD

All scores

CISA-ADP6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

A 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.

Patches

This vulnerability has been patched in TinyMCE 5.9.0 by ensuring schema validation was still performed after unwrapping invalid elements.

Workarounds

To work around this vulnerability, either:

  • Upgrade to TinyMCE 5.9.0 or higher
  • Manually sanitize the content using the BeforeSetContent event (see below)
Example: Manually sanitize content
editor.on('BeforeSetContent', function(e) {
  var sanitizedContent = ...; // Manually sanitize content here
  e.content = sanitizedContent;
});
Acknowledgements

Tiny Technologies would like to thank William Bowling for discovering this vulnerability.

References

https://www.tiny.cloud/docs/release-notes/release-notes59/#securityfixes

For more information

If you have any questions or comments about this advisory:

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21908 changed 2026-11-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-5h9g-x5rv-25wg changed 2026-07-08CC-BY-4.0
NVDCVE-2024-21908 changed 2026-07-14Public domain