What’s Vulnerable › Vulnerabilities
CVE-2022-21661: SQL injection in WordPress
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 97.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-01-06 · updated 2026-06-17
- Weakness: CWE-89
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.
Affected products
- Debian Linux: 9.0, 10.0, 11.0
- Fedoraproject Fedora: 34, 35
- WordPress: from 3.7 before 3.7.37; from 3.8 before 3.8.37; from 3.9 before 3.9.35; from 4.0 before 4.0.34; from 4.1 before 4.1.34; from 4.2 before 4.2.31 — fixed in 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31
How to fix
Upgrade to a fixed version: WordPress 3.7.37, 3.8.37, 3.9.35, 4.0.34. Check the vendor advisory for mitigations.
References
- http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
- https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
- https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/
- https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/
- https://www.debian.org/security/2022/dsa-5039
- https://www.exploit-db.com/exploits/50663
- https://www.zerodayinitiative.com/advisories/ZDI-22-020/
- http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
- https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
Get alerted when CVE-2022-21661 or the next vulnerability affects your stack