Security Bughunt

2017 - August - Amsterdam

2017 Target - IoT



Spyros Gasteratos, March 2017

Cross-Site Scripting vulnerability in Tribulant Slideshow Galleries WordPress Plugin

Abstract

A Cross-Site Scripting vulnerability was found in the Tribulant Slideshow Galleries 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/force a logged on WordPress Administrator 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-20160714-0016

Tested versions

This issue was successfully tested on Tribulant Slideshow Galleries WordPress Plugin version 1.6.3.

Fix

A fix for this issue is not available.

Introduction

The Tribulant Slideshow Galleries WordPress Plugin allows you to feature WordPress content in a beautiful and fast JavaScript-powered slideshow gallery. A Cross-Site Scripting vulnerability has been found in the Tribulant Slideshow Galleries 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/force a logged on WordPress Administrator into opening a malicious website.

Details

A reflected cross site scripting vulnerability exists in the plugin Slideshow Galleries. This issue is due to to the fact that the view/admin/galleries/index.php file uses the following code to output an HREF link:
"<a href="<?php echo GalleryHtmlHelper::retainquery('orderby=id&order=' .(($orderby == "id") ? $otherorder : "asc")); ?>">"

The above code fails to perform any output encoding on the retainquery method, thus allowing the tag to be closed and to inject a script element: /wp-admin/admin.php?page=slideshow-galleries&method=save"><script>alert(1)<%2fscript>pwned

Please note that this particular method is called another 19 times in the project. This indicates that more similar vulnerabilities could exist in the code.

Proof of concept

http://<target>/wp-admin/admin.php?page=slideshow-galleries&method=savegtlcq%5C%22%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3Exsxa2