SQL Injection Vulnerability Found in Wordpress Plugin
New SQL vulnerability found by Sucuria security researchers in NextGen Gallery of Wordpress plugin. Security researchers was working on multiple open source projects for security issues and discover new Vulnerability.
There are two different scenarios.
1.If you are using a NextGen Basic TagCloud Gallery on your site.
2.If you are allowing users to submit posts to be reviewed.
According to SUCURIA the Vulnerability Work follows
Malicious user injects the following input into the format string/query:
Which will make the query look like this:
When passed to the prepare method, it will be changed to:
(e.g. %s will become ‘%s’)
And then, after the resulting format string passed through the vsprintf function, the resulting SQL query will have the following form:
This means we will have an extra ‘ remaining. This breaks our string’s single-quote sequence and makes our raw [any_text2] input part of the SQL query itself.
The final attack payloads (using the TagCloud method) would look like the following:
What to do?
- NextGen gallery patch version have updated to 2.1.79.
- Immidiately update the plugin.