CVE-2022-21661 in the critical feed json
SQL injection in WordPress
published 2022-01-06 4 y ago modified 2026-09-08 2 mo ago also BIT-wordpress-2022-21661 , BIT-wordpress-multisite-2022-21661 , EUVD-2022-26878 , GHSA-6676-cqfm-gw84
- cvss
- 8.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 97.8%
- EPSS 97.8% chance of exploitation in 30 days, percentile 99.9%
- public exploits
- 1
- Exploit-DB, plus a Nuclei check
Summary
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.
Patch / fix
- bitnami wordpress 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.3
- bitnami wordpress-multisite 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.3
- wordpress wordpress 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7
- wordpress Debian 14, Debian 13, Debian 12 5.8.3+dfsg1-1
debian advisories DEBIAN-CVE-2022-21661
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-21661 updated cvss 8.0
wordpress: SQL injection via WP_Query
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- Published
- First public exploit (EDB-50663)
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
97.80% chance of exploitation in the next 30 days, higher than 99.9% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- EDB-50663 WordPress Core 5.8.2 - 'WP_Query' SQL Injection webapps, 2022-01-13
- Nuclei template WordPress <5.8.3 - SQL Injection nuclei detection template
- packetstormsecurity.com http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html referenced PoC, tagged "exploit" by a source, unverified
- vicarius.io https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.0 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | wordpress | >=3.7.0, <3.7.37 >=3.8.0, <3.8.37 >=3.9.0, <3.9.35 >=4.0.0, <4.0.34 >=4.1.0, <4.1.34 >=4.2.0, <4.2.31 >=4.3.0, <4.3.27 >=4.4.0, <4.4.26 >=4.5.0, <4.5.25 >=4.6.0, <4.6.22 >=4.7.0, <4.7.22 >=4.8.0, <4.8.18 >=4.9.0, <4.9.19 >=5.0.0, <5.0.15 >=5.1.0, <5.1.12 >=5.2.0, <5.2.14 >=5.3.0, <5.3.11 >=5.4.0, <5.4.9 >=5.5.0, <5.5.8 >=5.6.0, <5.6.7 >=5.7.0, <5.7.5 >=5.8.0, <5.8.3 |
3.7.37 3.8.37 3.9.35 4.0.34 4.1.34 4.2.31 4.3.27 4.4.26 4.5.25 4.6.22 4.7.22 4.8.18 4.9.19 5.0.15 5.1.12 5.2.14 5.3.11 5.4.9 5.5.8 5.6.7 5.7.5 5.8.3 |
| bitnami | wordpress-multisite | >=3.7.0, <3.7.37 >=3.8.0, <3.8.37 >=3.9.0, <3.9.35 >=4.0.0, <4.0.34 >=4.1.0, <4.1.34 >=4.2.0, <4.2.31 >=4.3.0, <4.3.27 >=4.4.0, <4.4.26 >=4.5.0, <4.5.25 >=4.6.0, <4.6.22 >=4.7.0, <4.7.22 >=4.8.0, <4.8.18 >=4.9.0, <4.9.19 >=5.0.0, <5.0.15 >=5.1.0, <5.1.12 >=5.2.0, <5.2.14 >=5.3.0, <5.3.11 >=5.4.0, <5.4.9 >=5.5.0, <5.5.8 >=5.6.0, <5.6.7 >=5.7.0, <5.7.5 >=5.8.0, <5.8.3 |
3.7.37 3.8.37 3.9.35 4.0.34 4.1.34 4.2.31 4.3.27 4.4.26 4.5.25 4.6.22 4.7.22 4.8.18 4.9.19 5.0.15 5.1.12 5.2.14 5.3.11 5.4.9 5.5.8 5.6.7 5.7.5 5.8.3 |
Affected products
- WordPress wordpress-develop
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
github.com
/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
patch, third-party-advisory, advisory
-
exploit-db.com
/exploits/50663
exploit, third-party-advisory, vdb-entry, advisory
-
packetstormsecurity.com
/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
exploit, third-party-advisory, vdb-entry, advisory
-
vicarius.io
/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661
exploit, third-party-advisory, advisory
-
debian.org
/security/2022/dsa-5039
vendor-advisory, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/
vendor-advisory, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/
vendor-advisory, third-party-advisory, advisory
-
wordpress.org
/news/2022/01/wordpress-5-8-3-security-release/
release-notes, vendor-advisory, advisory
-
github.com
/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
third-party-advisory, advisory
-
zerodayinitiative.com
/advisories/ZDI-22-020/
third-party-advisory, vdb-entry, advisory
-
lists.debian.org
/debian-lts-announce/2022/01/msg00019.html
mailing-list, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-21661
web
Sources
- CVE List CVE-2022-21661
- NVD CVE-2022-21661
- OSV BIT-wordpress-2022-21661
- OSV BIT-wordpress-multisite-2022-21661
- Maintainer advisory GHSA-6676-cqfm-gw84
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of WordPress/wordpress-develop published their own advisory on GitHub. Reviewed sources take precedence over it.