For feedback or questions about this advisory mail us at sumofpwn at securify.nl
This issue has been found during the Summer of Pwnage hacker event, running from July 1-29. A community summer event in which a large group of security bughunters (worldwide) collaborate in a month of security research on Open Source Software (WordPress this time). For fun. The event is hosted by Securify in Amsterdam.
This issue was successfully tested on Ninja Forms WordPress Plugin version 2.9.51.
This issue is resolved in Ninja Forms v2.9.52 (18 July 2016).
The WordPress Ninja Forms plugin insufficiently performs CSRF validation (ajaxreferer and nonce) and fails to perform output encoding according to context at any point where user-supplied input is copied into application responses. The vulnerability at least resides in the admin-ajax.php and edit.php page actions of the Ninja Forms plugin. As a result this malicious code will be executed.
Authenticated WP-Admins can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL or they can create an innocuous looking web site that causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using GET).
These vulnerabilities can be demonstrated by submitting the following requests to the form_id parameter of the admin-ajax.php and edit.php pages respectively:
Please note that the other parameter in this request are also vulnerable.