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.
CVE-2022-21661
Score elevated to 9.0 because EPSS predicts 98% probability of exploitation within the next 30 days (top 0.1% of all CVEs). NVD baseline CVSS 8.0 retained for reference. Confidence: see factors.
- High exploitation likelihood — EPSS 98%
- Public exploit code is available (ssvc poc, epss top5pct, epss high, public exploit)
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 8.0
- EG Score
- 9.0(high)
- EG Risk
- 80(Track*)EG Risk 80/100SSVC: Track*
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity90% × 45%Exploitation98% × 40%Automatability0% × 15%Action: Watch closely — could escalate to Attend. - EPSS PROB
- 98%
- EPSS %ILE
- 100%
- KEV
- Not listed
Published
January 6, 2022
Last Modified
August 19, 2025
References (21)
- security-advisories@githubhttp://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
- security-advisories@githubhttps://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
- security-advisories@githubhttps://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
- security-advisories@githubhttps://lists.debian.org/debian-lts-announce/2022/01/msg00019.html
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/
- security-advisories@githubhttps://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/
- security-advisories@githubhttps://www.debian.org/security/2022/dsa-5039
- security-advisories@githubhttps://www.exploit-db.com/exploits/50663
- security-advisories@githubhttps://www.zerodayinitiative.com/advisories/ZDI-22-020/
- af854a3a-2127-422b-91ae-364da2661108http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
- af854a3a-2127-422b-91ae-364da2661108https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
- af854a3a-2127-422b-91ae-364da2661108https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html
- af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/
Affected Packages
(6 across 6 ecosystems)
Debian:10(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | 5.0.10+dfsg1-0+deb10u1 ... 5.0.4+dfsg1-1+deb10u2 (7 versions) | 5.0.15+dfsg1-0+deb10u1 | — |
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | 5.7.1+dfsg1-2, 5.7.3+dfsg1-0+deb11u1 | 5.7.5+dfsg1-0+deb11u1 | — |
Debian:12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | — | 5.8.3+dfsg1-1 | — |
Debian:13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | — | 5.8.3+dfsg1-1 | — |
Debian:14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | — | 5.8.3+dfsg1-1 | — |
Debian:9(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| wordpress | 4.7.18+dfsg-1+deb9u1 ... 4.7.5+dfsg-2+deb9u6 (13 versions) | 4.7.22+dfsg-0+deb9u1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 1× in last 7d / 6× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-09-06 00:25 UTCOSV refresh
- 2026-08-28 21:38 UTCEPSS rescore
- 2026-08-24 14:13 UTCEPSS rescore
- 2026-08-20 22:52 UTCEPSS rescore
- 2026-08-19 11:02 UTCOSV refresh
- 2026-08-15 01:27 UTCEPSS rescore
- 2026-08-04 06:57 UTCOSV refresh
- 2026-08-02 02:24 UTCEPSS rescore
- 2026-07-26 14:52 UTCEPSS rescore
- 2026-07-26 14:52 UTCEPSS rescore
- 2026-07-23 02:08 UTCEG score recompute
- 2026-07-22 22:54 UTCEG score recompute
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-18 04:29 UTCOSV refresh
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:44 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-06-30 00:03 UTCOSV refresh
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 12:40 UTCOSV refresh
Show 13 moreShow fewer
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-26 05:15 UTCEG score recompute
Publicly available exploits
(9 references)Working exploit code is in the public domain (7 GitHub PoCs) (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCsealldeveloper/CVE-2022-21661-PoCFirst seen Apr 27, 2023
A Python PoC of CVE-2022-21661, inspired from z92g's Go PoC
Open source ↗ - GitHub PoCdaniel616/CVE-2022-21661-DemoFirst seen Feb 8, 2023
Demonstration of the SQL injection vulnerability in wordpress 5.8.2
Open source ↗ - GitHub PoCWellingtonEspindula/SSI-CVE-2022-21661First seen Jan 13, 2023
Study and exploit the vulnerability CVE-2022-21661 that allows SQL Injections through plugins POST requests to WordPress versions below 5.8.3.
Open source ↗ - GitHub PoCguestzz/CVE-2022-21661First seen Jul 31, 2022
CVE-2022-21661 exp for Elementor custom skin.
Open source ↗ - GitHub PoCz92g/CVE-2022-21661First seen Jul 28, 2022
WordPress WP_Query SQL Injection POC
Open source ↗ - GitHub PoC0x4E0x650x6F/Wordpress-cve-CVE-2022-21661First seen May 28, 2022
Wordpress 5.8.2 CVE-2022-21661 Vuln enviroment POC exploit
Open source ↗ - Open source ↗GitHub PoCpurple-WL/wordpress-CVE-2022-21661First seen Feb 12, 2022
- Exploit-DBEDB-50663First seen Jan 13, 2022
WordPress Core 5.8.2 - 'WP_Query' SQL Injection
Open source ↗ - Nucleihttp/cves/2022/CVE-2022-21661.yamlFirst seen Jan 1, 2022
WordPress <5.8.3 - SQL Injection
Open source ↗
Frequently asked(5)
What is CVE-2022-21661?
When was CVE-2022-21661 disclosed?
Is CVE-2022-21661 actively exploited?
What is the CVSS score of CVE-2022-21661?
How do I remediate CVE-2022-21661?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2022-21661
Is Your Infrastructure Affected by CVE-2022-21661?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.