CVE-2018-12895
HighWordPress 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.
Published Jun 26, 2018 · Updated Aug 4, 2026 · Also known as DEBIAN-CVE-2018-12895, DSA-4250-1, UBUNTU-CVE-2018-12895, c38a5e59-3233-4b37-bd6f-baf5dc9f9a01
Key Facts
Patch immediately- CVE-2018-12895 is a high-severity vulnerability (CVSS 8.8 v3.1) affecting Wordpress, Debian Linux.
- It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
- EPSS estimates a 62% probability of exploitation in the next 30 days.
- Fixed versions are available, including Wordpress 3.7.27, Wordpress 4.1+dfsg-1+deb8u18, Wordpress 4.7.5+dfsg-2+deb9u4.
- Brandefense priority: patch immediately, because it is very likely to be exploited soon.
CVSS v3.1
8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
62%
Higher than 99.1% of all scored CVEs
Exploited in the wild
No known
Not in a known-exploited catalog
Public exploit code
None known
Get the full CVE-2018-12895 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
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.
Affected Products
17 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| WordpressWordpress | >= 3.7 | 4.9.7 |
| Debian LinuxDebian | 8.0, 9.0 | n/a |
Patched Releases
Wordpress
3.7.27, 4.1+dfsg-1+deb8u18, 4.7.5+dfsg-2+deb9u4, 4.9.7+dfsg1-1, 4.9.7
Timeline
Publicly disclosed
Jun 26, 2018
Last updated
Aug 4, 2026
Weakness Type
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
- advisoryhttps://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
- advisory[debian-lts-announce] 20180730 [SECURITY] [DLA 1452-1] wordpress security update
- advisoryhttps://security-tracker.debian.org/tracker/CVE-2018-12895
- advisoryhttps://ubuntu.com/security/CVE-2018-12895
- advisoryhttps://wpvulndb.com/vulnerabilities/9100
FAQ
Common Questions.
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.
Affected: Wordpress versions >= 3.7; Debian Linux versions 8.0, 9.0. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including Wordpress 3.7.27, Wordpress 4.1+dfsg-1+deb8u18, Wordpress 4.7.5+dfsg-2+deb9u4.
Brandefense priority: patch immediately, because it is very likely to be exploited soon.
Is CVE-2018-12895 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo