WordPress Core < 4.9.7 - Authenticated Arbitrary File Deletion

2018-07-05 00:00
Matt Barry

Strategic Overview

Status
Patched in 3.7.27
Affected CoreWordPress 4.9
Affected Version3.7 – 4.9.6 · 14 branches
CVSS8.8High
CVECVE-2018-12895
View all WordPress 4.9 vulnerabilities

Vulnerability Overview

WordPress through 4.9.6 allows Author users to execute arbitrary code by leveraging directory traversal in the wp-admin/post.php thumb parameter, which is passed to the PHP unlink function and can delete the wp-config.php file. This is related to missing filename validation in the wp-includes/post.php wp_delete_attachment function. The attacker must have capabilities for files and posts that are normally available only to the Author, Editor, and Administrator roles. The attack methodology is to delete wp-config.php and then launch a new installation process to increase the attacker's privileges.

Technical Analysis

REMEDIATION: Update to one of the following versions, or a newer patched version: 3.7.27, 3.8.27, 3.9.25, 4.0.24, 4.1.24, 4.2.21, 4.3.17, 4.4.16, 4.5.15, 4.6.12, 4.7.11, 4.8.7, 4.9.7 --- IDENTIFIER: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

External References

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