Skip to content
DoS Advisory Intermediate

GHSL-2020-308: ReDoS (Regular Expression Denial of Service) in TinyMCE

TinyMCE contained a regular expression vulnerable to ReDoS, allowing an attacker to cause a denial of service by supplying a crafted string that triggers exponential backtracking. The issue could make the browser tab unresponsive.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

The project contains one or more regular expressions that are vulnerable to ReDoS (Regular Expression Denial of Service)

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the regular expression had overlapping or ambiguous clauses that allowed exponential backtracking on certain inputs.

Impact

This issue may lead to a denial of service, making the browser tab unresponsive.

What the attacker needed

Access to the TinyMCE editor; ability to insert a code sample

The fix

The vendor published an advisory, but the text does not describe the exact fix; generally, removing ambiguity in the regular expression would fix it.

How it was found

  1. Open the demo page and scroll to the interactive example.
  2. Press the Insert/Edit Code Sample button.
  3. Set the programming language to Ruby.
  4. Paste the crafted text into the code field and press Save.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A regular expression is a pattern used to match text. Some patterns can be written in a way that makes them very slow when given a specially crafted input, causing the program to freeze. Here, a user could paste a string into the editor that made the browser tab hang.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.