------------------------------------------------------------------------ Google Forms WordPress Plugin unauthenticated PHP Object injection vulnerability ------------------------------------------------------------------------ Yorick Koster, June 2016 ------------------------------------------------------------------------ Abstract ------------------------------------------------------------------------ A PHP Object injection vulnerability was found in the Google Forms WordPress Plugin, which can be used by an unauthenticated user to instantiate arbitrary PHP Objects. Using this vulnerability it is possible to execute arbitrary PHP code. ------------------------------------------------------------------------ OVE ID ------------------------------------------------------------------------ OVE-20160803-0001 ------------------------------------------------------------------------ Tested versions ------------------------------------------------------------------------ This issue was successfully tested on the Google Forms WordPress Plugin version 0.84 - 0.87. ------------------------------------------------------------------------ Fix ------------------------------------------------------------------------ This issue is resolved in Google Forms version 0.91. ------------------------------------------------------------------------ Details ------------------------------------------------------------------------ https://sumofpwn.nl/advisory/2016/google_forms_wordpress_plugin_unauthenticated_php_object_injection_vulnerability.html This issue is possible due to two unsafe calls to unserialize() in the ProcessGoogleForm() method. The input is taken directly from the POST request as can be seen in the following code fragment: wpgform-core.php: // Need the action which was saved during form construction $action = unserialize(base64_decode($_POST['wpgform-action'])) ; unset($_POST['wpgform-action']) ; $options = $_POST['wpgform-options'] ; unset($_POST['wpgform-options']) ; $options = unserialize(base64_decode($options)) ; ------------------------------------------------------------------------ Summer of Pwnage (https://sumofpwn.nl) is a Dutch community project. Its goal is to contribute to the security of popular, widely used OSS projects in a fun and educational way.