What’s Vulnerable › Vulnerabilities
CVE-2018-12895
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 62.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2018-06-26 · updated 2026-06-17
- Weakness: CWE-22
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
- Debian Linux: 8.0, 9.0
- WordPress: before 4.9.7 — fixed in 4.9.7
How to fix
Upgrade to a fixed version: WordPress 4.9.7. Check the vendor advisory for mitigations.
References
- http://packetstormsecurity.com/files/164633/WordPress-4.9.6-Arbitrary-File-Deletion.html
- http://www.securityfocus.com/bid/104569
- https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
- https://lists.debian.org/debian-lts-announce/2018/07/msg00046.html
- https://wpvulndb.com/vulnerabilities/9100
- https://www.debian.org/security/2018/dsa-4250
- http://packetstormsecurity.com/files/164633/WordPress-4.9.6-Arbitrary-File-Deletion.html
- http://www.securityfocus.com/bid/104569
- https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
- https://lists.debian.org/debian-lts-announce/2018/07/msg00046.html
- https://wpvulndb.com/vulnerabilities/9100
- https://www.debian.org/security/2018/dsa-4250
Get alerted when CVE-2018-12895 or the next vulnerability affects your stack