{"id":"CVE-2018-12895","aliases":["DEBIAN-CVE-2018-12895","DLA-1452-1","DSA-4250-1","EUVD-2018-4848","GHSA-v8xj-g4jr-hwhf","UBUNTU-CVE-2018-12895"],"status":"published","title":"WordPress through 4.9.6 allows Author users to execute arbitrary code by leveraging directory...","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.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.62162,"percentile":0.99185,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-22"],"published":"2018-06-26T20:00:00Z","modified":"2026-10-24T10:30:40Z","exploits":[{"source":"pocgithub","id":"bloom-ux/cve-2018-12895-hotfix","title":"bloom-ux/cve-2018-12895-hotfix","date":"2018-07-05","url":"https://github.com/bloom-ux/cve-2018-12895-hotfix"},{"source":"metasploit","id":"auxiliary/scanner/http/wp_arbitrary_file_deletion","title":"Wordpress Arbitrary File Deletion","type":"auxiliary","platform":"PHP","date":"2018-06-26","verified":true,"url":"https://www.rapid7.com/db/modules/auxiliary/scanner/http/wp_arbitrary_file_deletion"}],"fixes":[{"ecosystem":"Debian:12","package":"wordpress","fixed_in":["4.9.7+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"wordpress","fixed_in":["4.9.7+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"wordpress","fixed_in":["4.9.7+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:9","package":"wordpress","fixed_in":["4.7.5+dfsg-2+deb9u4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.9.7+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.9.7+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.9.7+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:8","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1+dfsg-1+deb8u18"}]}],"versions":["4.1+dfsg-1","4.1+dfsg-1+deb8u1","4.1+dfsg-1+deb8u10","4.1+dfsg-1+deb8u11","4.1+dfsg-1+deb8u12","4.1+dfsg-1+deb8u13","4.1+dfsg-1+deb8u14","4.1+dfsg-1+deb8u15","4.1+dfsg-1+deb8u16","4.1+dfsg-1+deb8u17","4.1+dfsg-1+deb8u2","4.1+dfsg-1+deb8u3","4.1+dfsg-1+deb8u4","4.1+dfsg-1+deb8u5","4.1+dfsg-1+deb8u6","4.1+dfsg-1+deb8u7","4.1+dfsg-1+deb8u8","4.1+dfsg-1+deb8u9"],"bundled":2},{"source":"osv","ecosystem":"Debian:9","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.7.5+dfsg-2+deb9u4"}]}],"versions":["4.7.5+dfsg-2","4.7.5+dfsg-2+deb9u1","4.7.5+dfsg-2+deb9u1~bpo8+1","4.7.5+dfsg-2+deb9u2","4.7.5+dfsg-2+deb9u2~bpo8+1","4.7.5+dfsg-2+deb9u3"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.3+dfsg-1","4.3.1+dfsg-1","4.4+dfsg-1","4.4.1+dfsg-1","4.4.2+dfsg-1","4.4.2+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.8.2+dfsg-2","4.8.3+dfsg-1","4.9.1+dfsg-1","4.9.2+dfsg-1","4.9.4+dfsg-1","4.9.5+dfsg1-1"]}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"wordpress","product":"wordpress"}],"references":[{"url":"https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","report"]},{"url":"http://www.securityfocus.com/bid/104569","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory"]},{"url":"https://www.debian.org/security/2018/dsa-4250","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory"]},{"url":"https://wpvulndb.com/vulnerabilities/9100","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00046.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://packetstormsecurity.com/files/164633/WordPress-4.9.6-Arbitrary-File-Deletion.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry","evidence"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-12895"},{"url":"https://github.com/advisories/GHSA-v8xj-g4jr-hwhf"},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-12895","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2018-12895","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-12895","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2018-12895","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.","status":"published","published":"2018-06-26T20:00:00Z","modified":"2024-08-05T08:45:02.465Z","updated_at":"2026-11-02T14:35:06.320867Z"}],"euvd":[{"id":"EUVD-2018-4848","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.","status":"published","published":"2018-06-26T20:00:00Z","modified":"2024-08-05T08:45:02Z","updated_at":"2026-11-03T02:39:51.651517Z"}],"ghsa":[{"id":"GHSA-v8xj-g4jr-hwhf","title":"WordPress through 4.9.6 allows Author users to execute arbitrary code by leveraging directory...","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.","status":"published","published":"2022-05-13T01:05:20Z","modified":"2023-02-01T05:02:52Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:49:58.981291Z"}],"nvd":[{"id":"CVE-2018-12895","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.","status":"published","published":"2018-06-26T20:29:00.273Z","modified":"2026-06-17T01:38:32.027Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.5,"vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:04:30.900603Z"}],"osv":[{"id":"CVE-2018-12895","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.","status":"published","published":"2018-06-26T20:29:00.273Z","modified":"2026-10-24T10:30:40.790931104Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:07.934182Z"},{"id":"DEBIAN-CVE-2018-12895","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.","status":"published","published":"2018-06-26T20:29:00.273Z","modified":"2026-10-23T18:03:28.599643253Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:30.290351Z"},{"id":"UBUNTU-CVE-2018-12895","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.","status":"published","published":"2018-06-26T20:29:00Z","modified":"2025-10-24T04:47:05Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:17.014176Z"},{"id":"DLA-1452-1","title":"wordpress - security update","status":"published","published":"2018-07-30T00:00:00Z","modified":"2026-03-09T01:00:45.775137Z","updated_at":"2026-11-02T15:46:09.336894Z"},{"id":"DSA-4250-1","title":"wordpress - security update","status":"published","published":"2018-07-18T00:00:00Z","modified":"2026-03-09T02:11:16.628384Z","updated_at":"2026-11-02T15:46:16.862196Z"}]}}
