← back
CVE-2022-21661highobserved exploitationCWE-89

SQL injection in WordPress

100Vexday Risk Score

Patch now. It exploitation observed by VulnCheck and has a working public exploit.

ssvc Actcvss 8epss 98%
from disclosure to weapon12 days
Published on NVDJan 6
1st PoC+12d
VulnCheck+716d
exploitation probability
98%top 1% of all CVEs
observed exploitation
yesVulnCheck
27 public exploit(s)
In short

WordPress has a SQL injection vulnerability in WP_Query where improperly sanitized input can allow attackers to execute unauthorized database commands through vulnerable plugins or themes. This flaw affects multiple WordPress versions and requires updating to patch the issue.

Technical detail

CWE-89 SQL injection in WP_Query stemming from insufficient input sanitization allows attackers to inject malicious SQL code through plugins or themes that utilize WP_Query without proper parameterization. The vulnerability requires an attacker to exploit a vulnerable plugin or theme, and successful exploitation enables unauthorized database access and manipulation. Patched in WordPress 5.8.3 and earlier versions back to 3.7.37.

Summary generated and translated by AI from the official description.
WordPress is a free and open-source content management system written in PHP and paired with a MariaDB database. Due to improper sanitization in WP_Query, there can be cases where SQL injection is possible through plugins or themes that use it in a certain way. This has been patched in WordPress version 5.8.3. Older affected versions are also fixed via security release, that go back till 3.7.37. We strongly recommend that you keep auto-updates enabled. There are no known workarounds for this vulnerability.
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.