CVE-2018-12895Wordpress Path Traversal
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.
Published Jun 26, 2018 · Updated Oct 24, 2026 · Also known as DEBIAN-CVE-2018-12895, DSA-4250-1, UBUNTU-CVE-2018-12895, WORDFENCE-c38a5e59-3233-4b37-bd6f-baf5dc9f9a01, 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. Public exploit code is available.
- EPSS estimates a 75% 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.
Scores
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)
75%
Higher than 99.5% of all scored CVEs
Exploit maturity
Proof of concept
ATLAS score
55/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Not listed
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
Proof of concept
Public exploit code
2
Proof-of-concept links
In-the-wild evidence
0
Reports of active use
Advisories And Exploit References
- advisoryhttps://security-tracker.debian.org/tracker/CVE-2018-12895
- advisoryhttps://ubuntu.com/security/CVE-2018-12895
- advisoryhttps://www.cve.org/CVERecord?id=CVE-2018-12895
- advisoryhttps://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
- advisory[debian-lts-announce] 20180730 [SECURITY] [DLA 1452-1] wordpress security update
- advisoryhttps://wpvulndb.com/vulnerabilities/9100
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
Oct 24, 2026
Weakness Type
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
- advisorysecurity-tracker.debian.org · CVE-2018-12895
- advisoryubuntu.com · CVE-2018-12895
- advisorycve.org · CVERecord
- advisoryblog.ripstech.com · wordpress-file-delete-to-code-execution
- advisory[debian-lts-announce] 20180730 [SECURITY] [DLA 1452-1] wordpress security update
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.
Public exploit code is available.
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 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo