All reports
High

WordPress Core < 4.9.7 - Authenticated Arbitrary File Deletion

Affected versions

WordPresswordpress
Affected versions
<3.7 || >=3.7 <=3.7.26 || >=3.8 <=3.8.26 || >=3.9 <=3.9.24 || >=4.0 <=4.0.23 || >=4.1 <=4.1.23 || >=4.2 <=4.2.20 || >=4.3 <=4.3.16 || >=4.4 <=4.4.15 || >=4.5 <=4.5.14 || >=4.6 <=4.6.11 || >=4.7 <=4.7.10 || >=4.8 <=4.8.6 || >=4.9 <=4.9.6
Fixed 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

Exploitation

CVE-2018-12895

Probability of exploitation in the next 30 days: 62.16%

FIRST EPSS · 2026-11-18

Description

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.

Links

Credits

  • Matt Barry
  • Karim El Ouerghemmi
  • Slavco Mihajloski

Data rights and licenses

Wordfence

Copyright 2012-2026 Defiant Inc.

Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.

License terms

Copyright 1999-2026 The MITRE Corporation

CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE®). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.

License terms