WordPress SQL Injection

OWASP 2013-A1 OWASP 2017-A1 OWASP 2021-A3 PCI v3.2-6.5.1 OWASP PC-C3 CAPEC-66 CWE-89 HIPAA-164.306(a) & HIPAA-164.308(a) ISO27001-A.14.2.5 WASC-19 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H WSTG-INPV-05

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 :

  • Reading, updating and deleting arbitrary data/tables from the database
  • Executing commands on the underlying operating system

Mitigation / Precaution

Related Articles