02 Mar

What Happened With WordPress Plugin Vulnerabilities in February 2018

If you want the best information and therefore best protection against vulnerabilities in WordPress plugins we provide you that through our service.

Here is what we did to keep those are already using our service secure from WordPress plugin vulnerabilities during February (and what you have been missing out on if you haven’t signed up yet):

Plugin Vulnerabilities We Discovered and Publicly Disclosed This Month

We don’t just collect data on vulnerabilities in plugins that others have discovered, we also discover vulnerabilities through proactive monitoring of changes made to plugins, monitoring hackers’ activity, reviewing other vulnerabilities, and by doing additional checking on the security of plugins.

The most concerning vulnerabilities this month were several PHP object injection vulnerabilities. That is a type of vulnerability likely to be exploited. Two of them were in plugins with 10,000+ active installs according to wordpress.org. Another one, which may have been being exploited already when we ran across it, was in an even more popular plugin (with 300,000+ active installs), but it was only exploitable by those logged in to WordPress, which limited the threat. Our Plugin Security Checker (which is now accessible through a WordPress plugin of its own) can detect the possibility of those variants of PHP object injection, so anyone can check if plugins they use may be impacted by a similar vulnerability.

Plugin Vulnerabilities We Helped Get Fixed This Month

Letting you know that you are using a vulnerable version of plugin is useful, but it is much more useful if you can fully protect yourself by simple updating to a new version. So we work with plugin developers to make sure that vulnerabilities get fixed.

Plugin Vulnerabilities Added This Month That Are In The Current Version of the Plugins

Keeping your plugins up to date isn’t enough to keep you secure as these vulnerabilities in the current versions of plugins show:

Additional Vulnerabilities Added This Month

As usual, there were plenty of other vulnerabilities that we added to our data during the month. The most serious vulnerabilities here being two of the PHP object injection vulnerabilities we discovered during the month, with one of them possibly being exploited already.

12 Feb

Our Proactive Monitoring Caught a Cross-site Request Forgery (CSRF)/Arbitrary File Upload Vulnerability in Flexible Captcha

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. That sometimes leads to us catching a vulnerability of a more limited variant of one of those serious vulnerability types, which isn’t as much concern for the average website, but could be utilized in a targeted attack. That happened with the cross-site request forgery (CSRF)/arbitrary file upload vulnerability we found in the plugin Flexible Captcha. This vulnerability could have allowed an attacker that could get a logged in Administrator to visit a URL the attacker controls, to upload a malicious file to the website, which the hacker could then use to take additional actions on their own with the website.

Since the check used to spot this is also included in our Plugin Security Checker (which  is now accessible through a WordPress plugin of its own), it is another of reminder of how that can help to indicate which plugins are in greater need of security review (for which we do as part of our service as well as separately).

The vulnerability involves the function handle_font_upload(), located in the file /lib/FlexibleCaptcha.class.php, which previously would save any type of file sent with a request to the directory /wp-content/uploads/fc-fonts/:

function handle_font_upload() {
	if (!file_exists($this->;fontDirectory . $_FILES['FC_font_upload']['name']) &&; move_uploaded_file( $_FILES['FC_font_upload']['tmp_name'], $this->fontDirectory . $_FILES['FC_font_upload']['name'] )) {

Since it is only intended to handle font uploads there should have been a limit on what types of files could be uploaded.

The threat of that would largely depend on who could access that. That function is called in the function settings_page() if a POST input “submit_font_file” exists:

function settings_page() {
	if (array_key_exists('submit_font_file', $_POST)) {

That function in turn is called when accessing the plugin’s settings page in the admin area of WordPress:

$plugin_page=add_submenu_page('options-general.php', 'Flexible Captcha Settings', 'Flexible Captcha', 'activate_plugins', 'Flexible_Captcha', array($this, 'settings_page'));

That page is only accessible by those logged in to WordPress that have the “activate_plugins” capability, which would normally be Administrators. Administrators normally have the ability to upload any type of file they want, so there being able to do that through this plugin isn’t a vulnerability on its own. The vulnerability here comes from a lack of a check for a valid nonce when processing the upload, which means an attacker could cause an Administrator to send a request to upload a file without them intending it.

Several hours after we contacted the developer they released version 3.4, which fixes this by adding a nonce check and doing a couple of checks on what type of file is being uploaded:

function handle_font_upload() {
	if (wp_verify_nonce(sanitize_text_field($_POST['FC_nonce']), plugin_basename(__FILE__))) {
		$fontMime = array('application/x-font-ttf', 'application/vnd.ms-opentype');
		if (preg_match("/(.otf|.ttf)$/", $_FILES['FC_font_upload']['name']) && in_array(mime_content_type($_FILES['FC_font_upload']['tmp_name']), $fontMime) && !file_exists($this->fontDirectory . $_FILES['FC_font_upload']['name']) && move_uploaded_file( $_FILES['FC_font_upload']['tmp_name'], $this->fontDirectory . $_FILES['FC_font_upload']['name'] )) {

Proof of Concept

The following proof of concept will upload the selected file to the directory /wp-content/uploads/fc-fonts/, when logged in as an Administrator.

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

<form action="http://[path to WordPress]/wp-admin/options-general.php?page=Flexible_Captcha" method="POST" enctype="multipart/form-data">
<input type="file" name="FC_font_upload" />
<input type="submit" name="submit_font_file" value="Submit" />


  • February 9, 2018 – Developer notified.
  • February 9, 2018 – Version 3.4 released, which fixes vulnerability.
  • February 9, 2018 – Developer responds.