CVE-2022-23494 Cross-site scripting vulnerability in TinyMCE alerts

Medium 5.4 Published Updated

Attackers can execute arbitrary JavaScript via malicious HTML in TinyMCE alert dialogs, affecting users of plugins like image.

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

What is CVE-2022-23494?

CVE-2022-23494 is a medium-severity cross-site scripting vulnerability in tinymce, published on 8 Dec 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

tinymce is an open source rich text editor. A cross-site scripting (XSS) vulnerability was discovered in the alert and confirm dialogs when these dialogs were provided with malicious HTML content. This can occur in plugins that use the alert or confirm dialogs, such as in the `image` plugin, which presents these dialogs when certain errors occur. The vulnerability allowed arbitrary JavaScript execution when an alert presented in the TinyMCE UI for the current user. This vulnerability has been patched in TinyMCE 5.10.7 and TinyMCE 6.3.1 by ensuring HTML sanitization was still performed after unwrapping invalid elements. Users are advised to upgrade to either 5.10.7 or 6.3.1. Users unable to upgrade may ensure the the `images_upload_handler` returns a valid value as per the images_upload_handler documentation.

Weakness: CWE-79

Which versions are affected by CVE-2022-23494?

12 open source packages ship an affected version, including TinyMCE, tinymce/tinymce and tinymce. It affects 1 product.

PackageAffectedFixed in
TinyMCE NuGetAll versions5.10.7
TinyMCE NuGetAll versions5.10.7
TinyMCE NuGetFrom 6.0.06.3.1
TinyMCE NuGetFrom 6.0.06.3.1
tinymce/tinymce PackagistAll versions5.10.7
tinymce/tinymce PackagistAll versions5.10.7
6 more packages
tinymce/tinymce PackagistFrom 6.0.06.3.1
tinymce/tinymce PackagistFrom 6.0.06.3.1
tinymce npmAll versions5.10.7
tinymce npmAll versions5.10.7
tinymce npmFrom 6.0.06.3.1
tinymce npmFrom 6.0.06.3.1

Products include Tiny Tinymce.

How do I fix CVE-2022-23494?

Upgrade TinyMCE to a fixed version for your release line: 5.10.7 or 6.3.1.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-23494 being exploited?

There is no known exploitation of CVE-2022-23494 in the wild and no public exploit code.

Sources

Also known as GHSA-gg8r-xjwq-4w92, UBUNTU-CVE-2022-23494.

Is CVE-2022-23494 in your software?

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

Check your SBOMs for free