CVE-2020-4049 Authenticated self-XSS via theme uploads in WordPress

Low 2.4 Published Updated

Authenticated administrators can trigger JavaScript execution via crafted theme folder names during upload, requiring an upgrade to patched versions.

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

What is CVE-2020-4049?

CVE-2020-4049 is a low-severity cross-site scripting vulnerability in Debian Debian Linux, published on 12 Jun 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

In affected versions of WordPress, when uploading themes, the name of the theme folder can be crafted in a way that could lead to JavaScript execution in /wp-admin on the themes page. This does require an admin to upload the theme, and is low severity self-XSS. This has been patched in version 5.4.2, along with all the previously affected versions via a minor release (5.3.4, 5.2.7, 5.1.6, 5.0.10, 4.9.15, 4.8.14, 4.7.18, 4.6.19, 4.5.22, 4.4.23, 4.3.24, 4.2.28, 4.1.31, 4.0.31, 3.9.32, 3.8.34, 3.7.34).

Weakness: CWE-79, CWE-80

Which versions are affected by CVE-2020-4049?

2 open source packages ship an affected version, including wordpress and wordpress-multisite. It affects 3 products.

PackageAffectedFixed in
wordpress BitnamiFrom 3.7.03.7.34, 3.8.34, 3.9.32, 4.0.31, 4.1.31, 4.2.28, 4.3.24, 4.4.23, 4.5.22, 4.6.19, 4.7.18, 4.8.14, 4.9.15, 5.0.10, 5.1.6, 5.2.7, 5.3.4, 5.4.2
wordpress-multisite BitnamiFrom 3.7.03.7.34, 3.8.34, 3.9.32, 4.0.31, 4.1.31, 4.2.28, 4.3.24, 4.4.23, 4.5.22, 4.6.19, 4.7.18, 4.8.14, 4.9.15, 5.0.10, 5.1.6, 5.2.7, 5.3.4, 5.4.2

Products include Debian Debian Linux, Fedoraproject Fedora, Wordpress Wordpress.

How do I fix CVE-2020-4049?

Upgrade wordpress to a fixed version for your release line: 3.7.34, 3.8.34, 3.9.32 or 4.0.31.

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-2020-4049 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as BIT-wordpress-2020-4049, BIT-wordpress-multisite-2020-4049, DEBIAN-CVE-2020-4049, GHSA-87h4-phjv-rm6p, UBUNTU-CVE-2020-4049.

Is CVE-2020-4049 in your software?

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

Check your SBOMs for free