Skip to content
Emerging threatsHigh

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

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

    Oct 24, 2026

Weakness Type

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

FAQ

Common Questions.

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

Figures as of Dec 4, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.