# CVE-2022-21661: SQL injection in WordPress

- Priority: **Prioritise**
- Reason: Public exploit (exploit-database, 13-01-2022)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-01-06 · Modified: 2024-09-09
- Aliases: UBUNTU-CVE-2022-21661, DEBIAN-CVE-2022-21661
- Record: https://cvemate.com/vulnerability/CVE-2022-21661 · JSON: https://cvemate.com/vulnerability/CVE-2022-21661/json

## Description

```text
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.
```

## Signals

- CVSS: 8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
- EPSS: 97.795%, percentile 99.904%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 3 (reference, exploit-database)

## Affected

- debian wordpress (Debian): \< 5.8.3+dfsg1-1
- ubuntu wordpress (Ubuntu): All versions (No fix recorded)
- debian debian\_linux: 9.0 \| 10.0 \| 11.0
- fedoraproject fedora: 34 \| 35
- wordpress wordpress: ≥ 3.7, \< 3.7.37 \| ≥ 3.8, \< 3.8.37 (fixed in 3.7.37) \| ≥ 3.9, \< 3.9.35 (fixed in 3.7.37) \| ≥ 4.0, \< 4.0.34 (fixed in 3.7.37) \| ≥ 4.1, \< 4.1.34 (fixed in 3.7.37) \| ≥ 4.2, \< 4.2.31 (fixed in 3.7.37) \| ≥ 4.3, \< 4.3.27 (fixed in 3.7.37) \| ≥ 4.4, \< 4.4.26 (fixed in 3.7.37) \| ≥ 4.5, \< 4.5.25 (fixed in 3.7.37) \| ≥ 4.6, \< 4.6.22 (fixed in 3.7.37) \| ≥ 4.7, \< 4.7.22 (fixed in 3.7.37) \| ≥ 4.8, \< 4.8.18 (fixed in 3.7.37) \| ≥ 4.9, \< 4.9.19 (fixed in 3.7.37) \| ≥ 5.0, \< 5.0.15 (fixed in 3.7.37) \| ≥ 5.1, \< 5.1.12 (fixed in 3.7.37) \| ≥ 5.2, \< 5.2.14 (fixed in 3.7.37) \| ≥ 5.3, \< 5.3.11 (fixed in 3.7.37) \| ≥ 5.4, \< 5.4.9 (fixed in 3.7.37) \| ≥ 5.5, \< 5.5.8 (fixed in 3.7.37) \| ≥ 5.6, \< 5.6.7 (fixed in 3.7.37) \| ≥ 5.7, \< 5.7.5 (fixed in 3.7.37) \| ≥ 5.8, \< 5.8.3 (fixed in 3.7.37)
- wordpress wordpress: ≥ 3.7, \< 3.7.37 \| ≥ 3.8, \< 3.8.37 \| ≥ 3.9, \< 3.9.35 \| ≥ 4.0, \< 4.0.34 \| ≥ 4.1, \< 4.1.34 \| ≥ 4.2, \< 4.2.31 \| ≥ 4.3, \< 4.3.27 \| ≥ 4.4, \< 4.4.26 \| ≥ 4.5, \< 4.5.25 \| ≥ 4.6, \< 4.6.22 \| ≥ 4.7, \< 4.7.22 \| ≥ 4.8, \< 4.8.18 \| ≥ 4.9, \< 4.9.19 \| ≥ 5.0, \< 5.0.15 \| ≥ 5.1, \< 5.1.12 \| ≥ 5.2, \< 5.2.14 \| ≥ 5.3, \< 5.3.11 \| ≥ 5.4, \< 5.4.9 \| ≥ 5.5, \< 5.5.8 \| ≥ 5.6, \< 5.6.7 \| ≥ 5.7, \< 5.7.5 \| ≥ 5.8, \< 5.8.3
- wordpress wordpress-develop: \< 5.8.3

## References

- <https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84>
- <https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214>
- <https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/>
- <https://www.zerodayinitiative.com/advisories/ZDI-22-020/>
- <https://www.debian.org/security/2022/dsa-5039>
- <https://www.exploit-db.com/exploits/50663>
- <http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/>
- <https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html>
- <https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661>
- <https://ubuntu.com/security/CVE-2022-21661>
- <https://hackerone.com/reports/1378209>
- <https://www.cve.org/CVERecord?id=CVE-2022-21661>
- <https://security-tracker.debian.org/tracker/CVE-2022-21661>
- <https://www.wordfence.com/threat-intel/vulnerabilities/id/b0ef885f-fd62-4513-83cb-65381b99a172>

---

Data as of 2026-12-05T04:44:25.156Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
