Skip to content
Noroxi
CVE-2018-12895· NVD / CVE Program· CNA mitre

WordPress through 4.9.6 allows Author users to execute arbitrary code by leveraging directory traversal in the wp-admin/post.php thumb param

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.

HighCVSS 8.8 · v3.1—Weaponized Fix available
Published
Jun 26, 2018
Updated
Jun 16, 2026
EPSS
62.2% · 99th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

54

Plan

Add it to your regular patch cycle.

CVSS
35 / 40 · 8.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
19 / 30 · 62.2%

Affected systems

VendorProduct
wordpresswordpress
debiandebian linux

Using wordpress? Add it to your stack and be the first to know about CVEs like this one. (WordPress)

Add to my stack

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • wordpress wordpressbefore 4.9.7

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12wordpressbefore 4.9.7+dfsg1-14.9.7+dfsg1-1
Debian:8wordpressbefore 4.1+dfsg-1+deb8u184.1+dfsg-1+deb8u18
Debian:9wordpressbefore 4.7.5+dfsg-2+deb9u44.7.5+dfsg-2+deb9u4

Other highest-scoring records for the same primary product.

  • CVE-2026-63030WordPress < 7.0.2 - REST API batch-route confusion and SQL injection issue leading to Remote Code ExecutionKEV
    72This week
  • CVE-2026-87902An unauthenticated attacker can make `get_page_template()` page-template resolution include a chosen readable local `.php` file outside the KEV
    68This week
  • CVE-2019-8942WordPress before 4.9.9 and 5.x before 5.0.1 allows remote code execution because an _wp_attached_file Post Meta entry can be changed to an a
    60This week
  • CVE-2022-21661SQL injection in WordPress
    59Plan
  • CVE-2026-60137WordPress < 7.0.2 - Facilitated SQL Injection via author__not_in in WP_QueryKEV
    55Plan
  • CVE-2017-1001000The register_routes function in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php in the REST API in WordPress 4.7.x before
    55Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
debian:wordpress4.9.7+dfsg1-1 · Debian:12Package registry (OSV)

Exploit status

Weaponized

A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.

Evidence

  • Metasploit module ×1
  • Proof-of-concept repository on GitHub ×1

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Metasploit moduleauxiliary/scanner/http/wp_arbitrary_file_deletionWordpress Arbitrary File Deletionauxiliary2018-06-26
Proof-of-concept repository on GitHubstars:02018-07-05

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. Metasploit-1 d
  2. Published
  3. First PoC+8 d
  4. TodaySep 30, 2026+3018 d
EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

nvd-primary

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records