Advisory:

CSRF/XSS vulnerability in Private Only could allow an attacker to do almost anything an admin user can

Vulnerability

Last revised:

This plugin fails to use CSRF and XSS prevention techniques which are available in WordPress (nonces, and esc_attr()) so it allows an attacker to cause a logged in admin user to be the victim of a CSRF attack which stores malicious content in the database which, due to lack of escaping, is output as raw HTML. Via JavaScript the attacker is able to cause the user’s browser to do almost anything including add users, delete posts, and even modify PHP files if that option hasn’t been disabled.

Current state: Reported

CVSS Summary

CVSS base scores for this vulnerability
Score 5.8 Medium
Vector Network
Complexity Medium
Authentication None
Confidentiality Partial
Integrity Partial
Availability None
You can read more about CVSS base scores on Wikipedia or in the CVSS specification.

Proof of concept

Pressing the submit button here will change the logo setting to contain some JavaScript. Browsers with no reflected XSS prevention (like Firefox) will execute the JavaScript immediately, other browsers will execute the JavaScript when the page is loaded next.

<form method="POST" action="http://localhost/wp-admin/options-general.php?page=privateonly.php">
  <input type="text" name="po_logo" value="&quot;>&lt;script>alert(1)&lt;/script>">
  <input type="text" name="po_submit" value="Y">
  <input type="submit">
</form>

Advisory timeline

  • 2015-03-20: Discovered
  • 2015-07-09: Reported to vendor by email
  • 2015-07-09: Requested CVE
  • 2015-07-31: No reply. Tried on twitter and got a brief response
  • 2015-08-18: After multiple further attempts, still no reply. Escalating to WP Plugins
  • 2015-08-24: Plugin has been removed from the WordPress plugins directory
  • 2015-08-26: Published

Mitigation/further actions

Disable: the plugin has been removed from the plugins directory and no fixed version is known.