CVE-2021-24154

Theme Editor <= 2.5 - Authenticated Arbitrary File Download

2021-02-13 00:00
Nguyen Van Khanh

Strategic Overview

Status
Patched in 2.6
Affected Plugin
Theme Editor
Affected Version
<= 2.5
CVSS
4.9Medium
Weakness type
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CVE
CVE-2021-24154
View all Theme Editor vulnerabilities

At a glance

CVE-2021-24154 is a medium-severity Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in the Theme Editor WordPress plugin, affecting versions <= 2.5. It carries a CVSS score of 4.9 (reachable over the network; low attack complexity; high confidentiality impact). Exploitation requires an authenticated account. The issue is fixed in version 2.6; sites on affected versions should update now. Disclosed February 2021, reported by Nguyen Van Khanh.

Vulnerability Overview

The Theme Editor WordPress plugin before 2.6 did not validate the GET file parameter before passing it to the download_file() function, allowing administrators to download arbitrary files on the web server, such as /etc/passwd

Technical Analysis

The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality.

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Theme Editor <= 2.5 carries this weakness at download_file(), and reaching it takes any authenticated account. Path traversal happens when user-controlled text is used to build a filesystem path without being constrained to an intended directory, so sequences like ../ walk the resolved path somewhere else.

Depending on the operation, it means reading files outside the intended folder — wp-config.php being the usual target — or writing to and deleting paths the web server can touch. For Theme Editor the fix is 2.6: builds <= 2.5 are affected, anything from 2.6 onward is not.

Remediation

Update to version 2.6, or a newer patched version

How does WordSec protect against this?

The attempt arrives as an ordinary request to Theme Editor: WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: Theme Editor 2.6 closes this, and updating the plugin is the step that ends it.

  • Firewall
  • Alerts

External References

Related records

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C