CVE-2021-27902 Craft CMS Cross-site Scripting Vulnerability

Medium 6.1 Published Updated

An XSS vulnerability in Craft CMS front-end forms allows attackers to inject malicious scripts via user uploads.

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 CVE-2021-27902?

CVE-2021-27902 is a medium-severity cross-site scripting vulnerability in Craftcms Craft Cms, published on 30 Jun 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

An issue was discovered in Craft CMS before 3.6.0. In some circumstances, a potential XSS vulnerability existed in connection with front-end forms that accepted user uploads.

Weakness: CWE-79

Which versions are affected by CVE-2021-27902?

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

PackageAffectedFixed in
craftcms/cms PackagistAll versions3.6.0
craftcms/cms PackagistAll versions3.6.0

Products include Craftcms Craft Cms.

How do I fix CVE-2021-27902?

Upgrade craftcms/cms to 3.6.0 or later.

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-2021-27902 being exploited?

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

All Craftcms Craft Cms vulnerabilities

Sources

Also known as GHSA-3jxh-789f-p7m6.

Is CVE-2021-27902 in your software?

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

Check your SBOMs for free