CVE-2022-37246 Craft CMS Cross-site Scripting vulnerability
An attacker can inject malicious scripts into the Craft CMS control panel via the element select input, potentially compromising user sessions.
- 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-37246?
CVE-2022-37246 is a medium-severity cross-site scripting vulnerability in Craftcms Craft Cms, published on 21 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 affected by Cross Site Scripting (XSS) in the file src/web/assets/cp/src/js/BaseElementSelectInput.js and in specific on the line label: elementInfo.label.
Weakness: CWE-79
Which versions are affected by CVE-2022-37246?
4 open source packages ship an affected version, including craftcms/cms. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
craftcms/cms Packagist | From 3.7.39 | 3.7.51 |
craftcms/cms Packagist | From 3.7.39 | 3.7.51 |
craftcms/cms Packagist | From 4.0.0-RC1 | 4.2.1 |
craftcms/cms Packagist | From 4.0.0-RC1 | 4.2.1 |
Products include Craftcms Craft Cms.
How do I fix CVE-2022-37246?
Upgrade craftcms/cms to a fixed version for your release line: 3.7.51 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-37246 being exploited?
There is no known exploitation of CVE-2022-37246 in the wild and no public exploit code.
Other vulnerabilities in Craftcms Craft Cms
Sources
Also known as GHSA-f546-v666-559x.