CVE-2022-37251 Craft CMS vulnerable to Cross-site Scripting via entry revisions and drafts

Medium 5.4 Published Updated

An attacker can inject malicious scripts via Craft CMS drafts, potentially leading to session hijacking or code execution.

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-37251?

CVE-2022-37251 is a medium-severity cross-site scripting vulnerability in Craftcms Craft Cms, published on 16 Sep 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

Craft CMS 4.2.0.1 is vulnerable to Cross Site Scripting (XSS) via Drafts.

Weakness: CWE-79

Which versions are affected by CVE-2022-37251?

4 open source packages ship an affected version, including craftcms/cms. It affects 1 product.

PackageAffectedFixed in
craftcms/cms PackagistFrom 3.7.0-beta.13.7.55.2
craftcms/cms PackagistFrom 3.7.0-beta.13.7.55.2
craftcms/cms PackagistFrom 4.0.0-RC14.2.1
craftcms/cms PackagistFrom 4.0.0-RC14.2.1

Products include Craftcms Craft Cms.

How do I fix CVE-2022-37251?

Upgrade craftcms/cms to a fixed version for your release line: 3.7.55.2 or 4.2.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-37251 being exploited?

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

All Craftcms Craft Cms vulnerabilities

Sources

Also known as GHSA-mw37-wx8p-gp45.

Is CVE-2022-37251 in your software?

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

Check your SBOMs for free