15 Apr

Our Proactive Monitoring Caught an Authenticated Arbitrary File Viewing Vulnerability Being Introduced in to Apply Online

One of the ways we help to improve the security of WordPress plugins, not just for our customers, but for everyone using them, is the proactive monitoring of changes made to plugins in the Plugin Directory to try to catch serious vulnerabilities. Through that we caught an authenticated arbitrary file viewing vulnerability being introduced in to the plugin Apply Online.

The possibility of this vulnerability is also flagged by our Plugin Security Checker, so you can check plugins you use to see if they might have similar issues with that tool.

The vulnerability occurs in the function output_attachment():

function output_attachment(){
	if(current_user_can('read_application') AND isset($_REQUEST['aol_attachment'])){
		// the file you want to send
		$path = $_REQUEST['aol_attachment'];
		// the file name of the download, change this if needed
		$public_name = basename($path);
		$mime_type = mime_content_type($path);
		// send the headers
		header("Content-Disposition: attachment; filename=$public_name;");
		header("Content-Type: $mime_type");
		header('Content-Length: ' . filesize($path));
		if( !function_exists('finfo_open') ){
			echo file_get_contents($path);

That will output the contents of a file specified by the GET or POST input “aol_attachment”.

Accessing that functionality in the function requires the “read_application” capability. The plugin provides that capability to those with Administrator role, as well to new roles created by the plugin, AOL Manager and AOL Jury, with the latter role having less capabilities. Users with those roles also have the level of access needed to access the function in the first place, as can be seen with the proof of concept below.

To fix this it looks like the functionality should limit what files can be viewed to only ones in the directory that stores attachments uploaded through this plugin.

Due to the moderators of the WordPress Support Forum’s continued inappropriate behavior we are full disclosing vulnerabilities in protest until WordPress gets that situation cleaned up, so we are releasing this post and then only trying to notify the developer through the WordPress Support Forum. You can notify the developer of this issue on the forum as well. Hopefully the moderators will finally see the light and clean up their act soon, so these full disclosures will no longer be needed (we hope they end soon). You would think they would have already done that since multiple previously full disclosed vulnerabilities were quickly on hackers’ radar, but it appears those moderators have such disdain for the rest of the WordPress community that their continued ability to act inappropriate is more important that what is best for the rest of the community.

Proof of Concept

The following proof of concept will show the contents of the WordPress configuration file, when logged in as a user with the AOL Jury role.

Make sure to replace “[path to WordPress]” with the location of WordPress.

http://[path to WordPress]/wp-admin/?aol_attachment=../wp-config.php

Is It Fixed?

If you are reading this post down the road the best way to find out if this vulnerability or other WordPress plugin vulnerabilities in plugins you use have been fixed is to sign up for our service, since what we uniquely do when it comes to that type of data is to test to see if vulnerabilities have really been fixed. Relying on the developer’s information, can lead you astray, as we often find that they believe they have fixed vulnerabilities, but have failed to do that.

Concerned About The Security of the Plugins You Use?

When you are a paying customer of our service, you can suggest/vote for the WordPress plugins you use to receive a security review from us. You can start using the service for free when you sign up now. We also offer security reviews of WordPress plugins as a separate service.