CVE-2024-21910: Tinymce Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-r8hm-w5f7-wj39
CVSS 6.1
CWE-64 CWE-79
Published
Advisory Summary

CVE-2024-21910 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-64: Windows Shortcut Following (.LNK)) affecting Tinymce libraries in the npm ecosystem. The issue involves cross-site scripting vulnerability in tinymce plugins. Remediation is available by upgrading affected packages to version 5.10.0, 3.4.0.

CVE-2024-21910 at a Glance

CVE Identifier CVE-2024-21910
GHSA Identifier GHSA-r8hm-w5f7-wj39
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-64: Windows Shortcut Following (.LNK)
Affected Product Tinymce
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-21910

To remediate this vulnerability, upgrade all affected Tinymce dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tinymce fixed: 5.10.0
npm install tinymce@5.10.0
tinymce/tinymce fixed: 5.10.0
Upgrade tinymce/tinymce to 5.10.0
TinyMCE fixed: 5.10.0
Upgrade TinyMCE to 5.10.0
django-tinymce fixed: 3.4.0
pip install django-tinymce>=3.4.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls tinymce

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-21910, inspect your project dependencies using npm:

npm ls tinymce

Analyze the terminal output to locate any version of Tinymce in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.10.0), your application is affected.

Note: The npm ls tinymce command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-64: Windows Shortcut Following (.LNK), where the product, when opening a file or directory, does not sufficiently handle when the file is a windows shortcut (.lnk) whose target is outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Tinymce, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A cross-site scripting (XSS) vulnerability was discovered in the URL processing logic of the `image` and `link` plugins. The vulnerability allowed arbitrary JavaScript execution when updating an image or link using a specially crafted URL. This issue only impacted users while editing and the dangerous URLs were stripped in any content extracted from the editor. This impacts all users who are using TinyMCE 5.9.2 or lower. ### Patches This vulnerability has been patched in TinyMCE 5.10.0 by improved sanitization logic when updating URLs in the relevant plugins. ### Workarounds To work around this vulnerability, either: - Upgrade to TinyMCE 5.10.0 or higher - Disable the `image` and `link` plugins ### Acknowledgements Tiny Technologies would like to thank Yakir6 for discovering this vulnerability. ### References https://www.tiny.cloud/docs/release-notes/release-notes510/#securityfixes ### For more information If you have any questions or comments about this advisory: * Email us at [infosec@tiny.cloud](mailto:infosec@tiny.cloud) * Open an issue in the [TinyMCE repo](https://github.com/tinymce/tinymce/issues)

CVE-2024-21910 Affected Tinymce Versions

4 component(s)
Fixed Versions:
5.10.03.4.0
Product / Package Ecosystem Affected Versions Fixed Version
tinymce
npm
< 5.10.0
5.10.0
tinymce/tinymce
Packagist
< 5.10.0
5.10.0
TinyMCE
NuGet
< 5.10.0
5.10.0
django-tinymce
PyPI
< 3.4.0
3.4.0

References

Frequently Asked Questions

What is CVE-2024-21910?
CVE-2024-21910 is a security vulnerability in Tinymce involving Cross-site scripting vulnerability in TinyMCE plugins under CWE-64: Windows Shortcut Following (.LNK).
Which Tinymce versions are affected?
Affected versions include releases prior to 5.10.0, 3.4.0 across affected packages: tinymce, tinymce/tinymce, TinyMCE, django-tinymce.
What version fixes CVE-2024-21910?
Upgrading to 5.10.0, 3.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tinymce affected?
Yes, tinymce is affected in releases prior to 5.10.0. Upgrade your dependency to 5.10.0 or later.
Is tinymce/tinymce affected?
Yes, tinymce/tinymce is affected in releases prior to 5.10.0. Upgrade your dependency to 5.10.0 or later.
What is the CVSS score of CVE-2024-21910?
CVE-2024-21910 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-21910?
CVE-2024-21910 is classified under CWE-64: Windows Shortcut Following (.LNK) (The product, when opening a file or directory, does not sufficiently handle when the file is a Windows shortcut (.LNK) whose target is outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.).
How can I check npm dependencies for CVE-2024-21910?
Run the dependency tree command: 'npm ls tinymce'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r8hm-w5f7-wj39",
  "modified" : "2024-01-03T22:33:13Z",
  "published" : "2021-11-02T15:42:52Z",
  "aliases" : [ "CVE-2024-21910" ],
  "summary" : "Cross-site scripting vulnerability in TinyMCE plugins",
  "details" : "### Impact\nA cross-site scripting (XSS) vulnerability was discovered in the URL processing logic of the `image` and `link` plugins. The vulnerability allowed arbitrary JavaScript execution when updating an image or link using a specially crafted URL. This issue only impacted users while editing and the dangerous URLs were stripped in any content extracted from the editor. This impacts all users who are using TinyMCE 5.9.2 or lower.\n\n### Patches\nThis vulnerability has been patched in TinyMCE 5.10.0 by improved sanitization logic when updating URLs in the relevant plugins.\n\n### Workarounds\nTo work around this vulnerability, either:\n- Upgrade to TinyMCE 5.10.0 or higher\n- Disable the `image` and `link` plugins\n\n### Acknowledgements\nTiny Technologies would like to thank Yakir6 for discovering this vulnerability.\n\n### References\nhttps://www.tiny.cloud/docs/release-notes/release-notes510/#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)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tinymce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.10.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "tinymce/tinymce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.10.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "TinyMCE"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.10.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-tinymce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinymce/tinymce/security/advisories/GHSA-r8hm-w5f7-wj39"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jazzband/django-tinymce/issues/366"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jazzband/django-tinymce/releases/tag/3.4.0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinymce/tinymce"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/django-tinymce/3.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-64", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-01T20:02:43Z",
    "nvd_published_at" : null
  }
}