All versions of WordPress will be vulnerable to SQL injection if there exists a vulnerable plugin in the web application. This vulnerability is present in the application because it had failed to properly sanitise user-supplied data before using it in an SQL query. Exploiting this issue in the WordPress will allow an attacker to compromise the security of the application easily and will give the attacker unauthorised access to modify data. The best method to attack and exploit WordPress-based applications after Cross-site Scripting (XSS) is SQL injection. SQL injection exists because of loopholes present in the web application. The loopholes are the bugs through which an attacker can abuse the input fields to attack the web application. The primary entry points for exploiting SQL injection are Shopping carts, Site searches, Login forms and many more. According to the latest report by WordPress, only 42.3% of the sites are using the latest version of WordPress. Rest 57.7% of the sites are vulnerable to attacks like SQL injection, XSS and many more.
Depending on the back-end database configuration, its privilege setup and the operating system, a hacker can mount one or more of the following type of attacks :