CVE-2018-12895
HIGHWordpress < 4.9.7 - Path Traversal
Title source: ruleDescription
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.
Exploits (2)
metasploit
WORKING POC
by Slavco Mihajloski, Karim El Ouerghemmi, Aloïs Thévenot · rubypocphp
https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/wp_arbitrary_file_deletion.rb
References (6)
Scores
CVSS v3
8.8
EPSS
0.8902
EPSS Percentile
99.5%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Details
CWE
CWE-22
Status
published
Products (3)
debian/debian_linux
8.0
debian/debian_linux
9.0
wordpress/wordpress
< 4.9.7
Published
Jun 26, 2018
Tracked Since
Feb 18, 2026