TinyMCE codesample plugin regex denial of service

Severity: info · CVSS 0 · Published 2021-01-06

TinyMCE is a widely-used rich-text editor component embedded in web applications. A regular expression denial of service (ReDoS) vulnerability in the codesample plugin can cause the browser to freeze when a user attempts to highlight poorly-formed Ruby code samples. An attacker could exploit this by crafting malicious Ruby code in a document to render the editor unresponsive and degrade user experience.

Technologies: tinymce (npm). Vendors: npm.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, with a CVSS score of 0, published 6 January 2021.
Which products and versions are affected?
tinymce (npm) SEMVER:introduced=0,fixed=5.6.0.
Is there a fix for This vulnerability?
Yes. tinymce (npm): upgrade to 5.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked with local access, in a software library.
Am I affected?
Check whether you run tinymce (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • tinymce (npm): upgrade to 5.6.0 or later
    npm install tinymce@5.6.0

Technical details

A regex denial of service (ReDoS) vulnerability was discovered in a dependency of the codesample plugin, specifically in the syntax highlighter used for Ruby code samples. The vulnerability resides in the regex pattern matching logic used during syntax highlighting. Attack vector is local (user-initiated) with no authentication required—simply viewing or attempting to edit a document containing malformed Ruby code triggers the ReDoS condition. An attacker can craft poorly-formed Ruby code that causes the regex engine to perform excessive backtracking, freezing the browser and rendering the editor unusable. The vulnerability affects TinyMCE versions prior to 5.6.0 and was fixed in version 5.6.0 by upgrading the underlying syntax highlighting dependency. Workarounds include disabling the codesample plugin or upgrading to PrismJS 1.21.0 or higher.

Affected products

  • Tiny Technologies TinyMCE < 5.6.0

Timeline

  • 2021-01-06: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.