Skip to content
Vulnerability Intelligence

CVE-2018-12895

High

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 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
ProductAffected versionsFixed in
WordpressWordpress>= 3.74.9.7
Debian LinuxDebian8.0, 9.0n/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

  1. Publicly disclosed

    Jun 26, 2018

  2. Last updated

    Aug 4, 2026

Weakness Type

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

References

6 more references in the full CVE brief

FAQ

Common Questions.

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