GHSA-h96f-fc7c-9r55 Regex denial of service vulnerability in codesample plugin

Not scored Published

A regex denial of service in the codesample plugin allows attackers to lock up browsers via malformed Ruby code samples, affecting TinyMCE users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-h96f-fc7c-9r55?

GHSA-h96f-fc7c-9r55 is a denial of service vulnerability in tinymce, published on 6 Jan 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Impact

A regex denial of service (ReDoS) vulnerability was discovered in a dependency of the codesample plugin. The vulnerability allowed poorly formed ruby code samples to lock up the browser while performing syntax highlighting. This impacts users of the codesample plugin using TinyMCE 5.5.1 or lower.

Patches

This vulnerability has been patched in TinyMCE 5.6.0 by upgrading to a version of the dependency without the vulnerability.

Workarounds

To work around this vulnerability, either:

  • Upgrade to TinyMCE 5.6.0 or higher
  • Disable the codesample plugin
  • Disable ruby code samples using the codesample_languages setting
  • Override the PrismJS syntax highlighter to version 1.21.0 or higher using the codesample_global_prismjs setting

Acknowledgements

Tiny Technologies would like to thank Erik Krogh Kristensen at GitHub for discovering this vulnerability.

References

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

For more information

If you have any questions or comments about this advisory:

Which versions are affected by GHSA-h96f-fc7c-9r55?

2 open source packages ship an affected version, including tinymce.

PackageAffectedFixed in
tinymce npmAll versions5.6.0
tinymce npmAll versions5.6.0

How do I fix GHSA-h96f-fc7c-9r55?

Upgrade tinymce to 5.6.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is GHSA-h96f-fc7c-9r55 being exploited?

There is no known exploitation of GHSA-h96f-fc7c-9r55 in the wild and no public exploit code.

Sources

Is GHSA-h96f-fc7c-9r55 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free