{"id":"CVE-2018-12895","details":"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.","modified":"2026-04-10T04:05:06.253733Z","published":"2018-06-26T20:29:00.273Z","references":[{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00046.html"},{"type":"ADVISORY","url":"https://wpvulndb.com/vulnerabilities/9100"},{"type":"ADVISORY","url":"https://www.debian.org/security/2018/dsa-4250"},{"type":"ADVISORY","url":"http://www.securityfocus.com/bid/104569"},{"type":"ADVISORY","url":"https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/"},{"type":"EVIDENCE","url":"http://packetstormsecurity.com/files/164633/WordPress-4.9.6-Arbitrary-File-Deletion.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/wordpress/wordpress","events":[{"introduced":"0"},{"fixed":"d1802a68ec7a3536f744d45afb72660e4fef0292"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"4.9.7"}]}}],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"8.0"}]},{"events":[{"introduced":"0"},{"last_affected":"9.0"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-12895.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}