NewStatPress <= 1.0.4 - SQL Injection

The Search functionality is susceptible to a SQL Injection attack due to usage of user input without sanitation.

In particular, at line 98 of ‘includes/nsp_search.php’.

Utilising a specially crafted SQL query, we can trigger disclosure of user hashes through an IMG tag as the data channel.
Proof of Concept
The following URL will trigger an SQLI attack, which in turn injects an element into the page, which allows for transmission of the retrieved user hashes to an attacker-controlled URL. In the PoC below, it will output an IMG element pointing to http://attacker/?creds=CREDS, where CREDS is replaced with a concatenated list of usernames and password hashes.

As the strings in the call are encoded with the MySQL function ‘hex’, there is no need to use any quotes. This is to bypass the quote escaping implemented by WordPress. Should an Administrative user be tricked into visiting the URL, all of the usernames and password hashes will be transmitted (so long as there are no restrictive CSP headers implemented).


Affects Plugin

fixed in version 1.0.6






Submitter James Hooker
Submitter Website
Submitter Twitter g0blinResearch
Views 3058
Verified No


Publicly Published 2015-07-07 (almost 4 years ago)
Added 2015-07-07 (almost 4 years ago)
Last Updated 2015-07-07 (almost 4 years ago)

Copyright & License

Copyright All data and resources contained within this page and this web site is Copyright © The WPScan Team.
License Some of this data may be used for non-commercial purposes, however, any potential commercial usage of this data will require a license. If you would like to inquire about a commercial license please contact us.