PT-2018-11457 · WordPress · Wordpress

Published

2018-06-26

·

Updated

2021-11-05

·

CVE-2018-12895

CVSS v3.1

8.8

High

VectorAV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions WordPress versions prior to 4.9.7
Description The issue allows Author users to execute arbitrary code by leveraging directory traversal in the "wp-admin/post.php" endpoint, specifically the 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 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.
Recommendations For WordPress versions prior to 4.9.7, update to version 4.9.7 or later to resolve the issue. As a temporary workaround, consider restricting access to the wp-admin/post.php endpoint and the wp delete attachment function to minimize the risk of exploitation. Additionally, restrict the thumb parameter in the wp-admin/post.php endpoint to prevent directory traversal attacks.

Exploit

Fix

Path traversal

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2018-12895
DLA-1452-1
DSA-4250-1

Affected Products

Wordpress