CVE-2022-21661
High PUBLISHEDSQL injection in WordPress
Not yet in CISA KEV
Recommended Action
Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
At a Glance
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 Published
- Jan 06, 2022
- Exploitation Reported
- Jan 06, 2022
- CVSS
- 8.0 High
- EPSS
- —
Affected Versions
| Vendor | Product | Version | Status |
|---|---|---|---|
| WordPress |
wordpress-develop
|
< 5.8.3 |
Affected |
CVE References
- DSA-5039 debian.org · Vendor Advisory https://www.debian.org/security/2022/dsa-5039
- FEDORA-2022-8472dd59ff lists.fedoraproject.org · Vendor Advisory https://lists.fedoraproject.org/archives/list/package-announce%40list...
- FEDORA-2022-e37e1e6c7a lists.fedoraproject.org · Vendor Advisory https://lists.fedoraproject.org/archives/list/package-announce%40list...
- [debian-lts-announce] 20220123 [SECURITY] [DLA 2884-1] wordpress security update lists.debian.org · Mailing List https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html
- GitHub — WordPress/wordpress-develop github.com · CVE Record https://github.com/WordPress/wordpress-develop/security/advisories/GH...
Show 5 more references
- GitHub — WordPress/wordpress-develop github.com · CVE Record https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec6455...
- wordpress.org/news/2022/01/wordpress-5-8-3-security-release wordpress.org · CVE Record https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/
- zerodayinitiative.com/advisories/ZDI-22-020 zerodayinitiative.com · CVE Record https://www.zerodayinitiative.com/advisories/ZDI-22-020/
- exploit-db.com/exploits/50663 exploit-db.com · CVE Record https://www.exploit-db.com/exploits/50663
- packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Inject... packetstormsecurity.com · CVE Record http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-...
Recommended Actions
- Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
- Check enrichment artifacts for scanner coverage and available PoCs before rolling remediation validation.
- Use the Pro API to automate enrichment, telemetry, and workflow delivery for VM, SOC, and CTI pipelines.
Known Exploited Vulnerability Sources
Catalogues that list this CVE as a known exploited vulnerability.
Per-source evidence links for KEV attestations are available through the KEVIntel Pro API.
Learn about Pro API access| Source | Added |
|---|---|
| The Shadowserver First | 2022-01-06 22:50 UTC |
Scanner Artifacts
Nuclei and Metasploit references linked to this CVE.
| Scanner | Reference | Detected |
|---|---|---|
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-21661.yaml | Apr 25, 2025 |
Virtual Patch
Compensating WAF rules to help reduce exposure to this CVE. Rule content and deployable vendor exports are available with KEVIntel Enterprise.
KEVIntel does not currently have a virtual patch for this CVE. When available, KEVIntel virtual patches ship as deployable ModSecurity, Cloudflare, and AWS WAF rules.
Enterprise feature. Virtual patch rule content and deployable vendor exports (ModSecurity, Cloudflare, AWS WAF) are available to KEVIntel Enterprise users via the Pro API.
Learn About Virtual PatchesCVSS Scores
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Exploitation Status
Exploited in the wild
Recorded 2022-01-06 22:50:11 UTC · The Shadowserver
Proof of concept available
Recorded 2022-07-28 13:12:51 UTC · GitHub
Weaknesses (CWE)
-
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Scanner Integrations
| Scanner | Reference | Detected |
|---|---|---|
| Nuclei | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-21661.yaml | Apr 25, 2025 |
Potential Proof of Concepts
These PoCs are unverified and could contain malware. Use at your own risk.
github · Created 2023-04-27 00:36:16 UTC · 6 stars
A Python PoC of CVE-2022-21661, inspired from z92g's Go PoC
github · Created 2023-02-08 04:58:57 UTC · 2 stars
Demonstration of the SQL injection vulnerability in wordpress 5.8.2
github · Created 2023-01-13 13:31:34 UTC · 6 stars
Study and exploit the vulnerability CVE-2022-21661 that allows SQL Injections through plugins POST requests to WordPress versions below 5.8.3.
github · Created 2022-11-08 06:10:49 UTC · 0 stars
The first poc video presenting the sql injection test from ( WordPress Core 5.8.2-'WP_Query' / CVE-2022-21661)
github · Created 2022-07-31 11:53:06 UTC · 6 stars
CVE-2022-21661 exp for Elementor custom skin.
github · Created 2022-07-28 13:12:51 UTC · 27 stars
WordPress WP_Query SQL Injection POC
github · Created 2022-05-28 10:46:48 UTC · 13 stars
Wordpress 5.8.2 CVE-2022-21661 Vuln enviroment POC exploit
github · Created 2022-02-12 11:31:26 UTC · 17 stars
github · Created 2022-01-18 01:05:04 UTC · 16 stars
WordPress Core 5.8.2 - 'WP_Query' SQL Injection
nuclei · Created Unknown
Timeline
Key exploitation, disclosure, scanner coverage, and KEV attestation events for this CVE.
-
00:00 UTC about 1 year ago00:00 UTC · about 1 year ago
Nuclei template available
Scanner coverage available
-
13:12 UTC almost 4 years ago13:12 UTC · almost 4 years ago
Public PoC available
Public proof-of-concept code published
-
22:50 UTC over 4 years ago22:50 UTC · over 4 years ago
Added to KEVIntel KEV Feed
High-confidence, third-party attested exploitation
-
22:50 UTC over 4 years ago22:50 UTC · over 4 years ago
CVE published
Vulnerability disclosed publicly
-
00:00 UTC over 4 years ago00:00 UTC · over 4 years ago
CVE ID reserved
Identifier reserved by the CNA
Automate This Intelligence with the Pro API
Confidence scoring, exploit status, sensor telemetry, PoCs, scanner integrations, mentions, and tags are available programmatically for VM, SOC, and CTI workflows.
Pro API Example
GET /api/v2/pro/kevs/CVE-2022-21661
{
"cve_id": "CVE-2022-21661",
"title": "SQL injection in WordPress",
"affected_vendor": "WordPress",
"affected_product": "wordpress-develop",
"affected_versions": [
{ "vendor": "...", "product": "...", "status": "affected", "display_label": "..." }
],
"confidence": "High",
"cvss_score": 8.0,
"epss_score": null,
"exploit_status": {
"exploited_in_the_wild": true,
"active_exploitation_observed": false
},
"sensor_telemetry": { "...": "Pro API fields" },
"proof_of_concepts": [ "..." ],
"scanner_integrations": [ "..." ]
}