CVE-2022-21661
SQL injection in WordPress
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- High
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.0
SQL injection in WordPress
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.
- Record
CVE-2022-21661- CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2022-26878
8.0
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.
- Record
EUVD-2022-26878- CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-03
NVD
8.0
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.
- Record
CVE-2022-21661- CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
8.0
SQL injection in WordPress
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.
- Record
CVE-2022-21661- CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-21661
7.5
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.
- Record
DEBIAN-CVE-2022-21661- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-03
OSVUBUNTU-CVE-2022-21661
8.0
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.
- Record
UBUNTU-CVE-2022-21661- CVSS 3.1
- 8.0 High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVBIT-wordpress-2022-21661 No score
SQL injection in WordPress
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.
- Record
BIT-wordpress-2022-21661- Updated
- 2026-11-02
OSVBIT-wordpress-multisite-2022-21661 No score
SQL injection in WordPress
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.
- Record
BIT-wordpress-multisite-2022-21661- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
wordpressBitnami |
3.7.0 up to 3.7.37, 3.8.0 up to 3.8.37, 3.9.0 up to 3.9.35, 4.0.0 up to 4.0.34, 4.1.0 up to 4.1.34, 4.2.0 up to 4.2.31, 4.3.0 up to 4.3.27, 4.4.0 up to 4.4.26, 4.5.0 up to 4.5.25, 4.6.0 up to 4.6.22, 4.7.0 up to 4.7.22, 4.8.0 up to 4.8.18, 4.9.0 up to 4.9.19, 5.0.0 up to 5.0.15, 5.1.0 up to 5.1.12, 5.2.0 up to 5.2.14, 5.3.0 up to 5.3.11, 5.4.0 up to 5.4.9, 5.5.0 up to 5.5.8, 5.6.0 up to 5.6.7, 5.7.0 up to 5.7.5, 5.8.0 up to 5.8.3 | 3.7.373.8.373.9.354.0.344.1.344.2.314.3.274.4.264.5.254.6.224.7.224.8.184.9.195.0.155.1.125.2.145.3.115.4.95.5.85.6.75.7.55.8.3 |
wordpress-multisiteBitnami |
3.7.0 up to 3.7.37, 3.8.0 up to 3.8.37, 3.9.0 up to 3.9.35, 4.0.0 up to 4.0.34, 4.1.0 up to 4.1.34, 4.2.0 up to 4.2.31, 4.3.0 up to 4.3.27, 4.4.0 up to 4.4.26, 4.5.0 up to 4.5.25, 4.6.0 up to 4.6.22, 4.7.0 up to 4.7.22, 4.8.0 up to 4.8.18, 4.9.0 up to 4.9.19, 5.0.0 up to 5.0.15, 5.1.0 up to 5.1.12, 5.2.0 up to 5.2.14, 5.3.0 up to 5.3.11, 5.4.0 up to 5.4.9, 5.5.0 up to 5.5.8, 5.6.0 up to 5.6.7, 5.7.0 up to 5.7.5, 5.8.0 up to 5.8.3 | 3.7.373.8.373.9.354.0.344.1.344.2.314.3.274.4.264.5.254.6.224.7.224.8.184.9.195.0.155.1.125.2.145.3.115.4.95.5.85.6.75.7.55.8.3 |
wordpressDebian:12 |
before 5.8.3+dfsg1-1 | 5.8.3+dfsg1-1 |
wordpressDebian:13 |
before 5.8.3+dfsg1-1 | 5.8.3+dfsg1-1 |
wordpressDebian:14 |
before 5.8.3+dfsg1-1 | 5.8.3+dfsg1-1 |
wordpressDebian:9 From an advisory covering 4 CVEs |
before 4.7.22+dfsg-0+deb9u1, plus listed versions 4.7.18+dfsg-1+deb9u14.7.19+dfsg-1+deb9u14.7.20+dfsg-1+deb9u14.7.21+dfsg-0+deb9u14.7.5+dfsg-2 Show 8 moreShow less4.7.5+dfsg-2+deb9u14.7.5+dfsg-2+deb9u1~bpo8+14.7.5+dfsg-2+deb9u24.7.5+dfsg-2+deb9u2~bpo8+14.7.5+dfsg-2+deb9u34.7.5+dfsg-2+deb9u44.7.5+dfsg-2+deb9u54.7.5+dfsg-2+deb9u6 |
4.7.22+dfsg-0+deb9u1 |
wordpressDebian:10 From an advisory covering 4 CVEs |
before 5.0.15+dfsg1-0+deb10u1, plus listed versions 5.0.10+dfsg1-0+deb10u15.0.11+dfsg1-0+deb10u15.0.12+dfsg1-0+deb10u15.0.14+dfsg1-0+deb10u15.0.4+dfsg1-15.0.4+dfsg1-1+deb10u15.0.4+dfsg1-1+deb10u2 |
5.0.15+dfsg1-0+deb10u1 |
wordpressDebian:11 From an advisory covering 4 CVEs |
before 5.7.5+dfsg1-0+deb11u1, plus listed versions 5.7.1+dfsg1-25.7.3+dfsg1-0+deb11u1 |
5.7.5+dfsg1-0+deb11u1 |
wordpressUbuntu:16.04:LTS |
All versions, plus listed versions 4.3+dfsg-14.3.1+dfsg-14.4+dfsg-14.4.1+dfsg-14.4.2+dfsg-14.4.2+dfsg-1ubuntu1 |
None known |
wordpressUbuntu:18.04:LTS |
All versions, plus listed versions 4.8.2+dfsg-24.8.3+dfsg-14.9.1+dfsg-14.9.2+dfsg-14.9.4+dfsg-14.9.5+dfsg1-1 |
None known |
wordpressUbuntu:20.04:LTS |
All versions, plus listed versions 5.2.2+dfsg1-15.2.4+dfsg1-15.3.2+dfsg1-15.3.2+dfsg1-1ubuntu1 |
None known |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | WordPress Core 5.8.2 - 'WP_Query' SQL Injection | 2022-01-13 |
| PoC in GitHub | purple-WL/wordpress-CVE-2022-21661 | 2022-02-12 |
| PoC in GitHub | 0x4E0x650x6F/Wordpress-cve-CVE-2022-21661 | 2022-05-28 |
| PoC in GitHub | z92g/CVE-2022-21661 | 2022-07-28 |
| PoC in GitHub | guestzz/CVE-2022-21661 | 2022-07-31 |
| PoC in GitHub | safe3s/CVE-2022-21661 | 2022-11-08 |
| PoC in GitHub | WellingtonEspindula/SSI-CVE-2022-21661 | 2023-01-13 |
| PoC in GitHub | daniel616/CVE-2022-21661-Demo | 2023-02-08 |
| PoC in GitHub | sealldeveloper/CVE-2022-21661-PoC | 2023-04-27 |
| PoC in GitHub | p4ncontomat3/CVE-2022-21661 | 2024-01-04 |
Show 5 moreShow less
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | CharonDefalt/WordPress--CVE-2022-21661 | 2024-03-24 |
| PoC in GitHub | w0r1i0g1ht/CVE-2022-21661 | 2024-11-12 |
| PoC in GitHub | Fauzan-Aldi/CVE-2022-21661 | 2025-05-13 |
| PoC in GitHub | 7rootsec/CVE-2022-21661-Technical-Analysis | 2026-03-01 |
| Nuclei | WordPress <5.8.3 - SQL Injection |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| exploits | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, Exploit-DB, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-21661 is a high vulnerability (CVSS 8.0) in Wordpress, published January 6, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 97.8%, the 99th percentile. Fixed in wordpress 3.7.37.
References
github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
wordpress.org/news/2022/01/wordpress-5-8-3-security-release
zerodayinitiative.com/advisories/ZDI-22-020
debian.org/security/2022/dsa-5039
exploit-db.com/exploits/50663
Show 11 moreShow less
packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG
lists.debian.org/debian-lts-announce/2022/01/msg00019.html
vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661
nvd.nist.gov/vuln/detail/CVE-2022-21661
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21661.json
security-tracker.debian.org/tracker/CVE-2022-21661
ubuntu.com/security/CVE-2022-21661
hackerone.com/reports/1378209
cve.org/CVERecord?id=CVE-2022-21661