CVE-2022-21661SQL injection in WordPress
- 8.0HighCVSS base score
- 97.8%Exploitation in 30 daysEPSS · top 0.1% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 2Public exploitsMetasploit, Nuclei and Exploit-DB
Description
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Nuclei template and an Exploit-DB entry for it. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits2
Nuclei templates1 template
- WordPress <5.8.3 - SQL Injection (Nuclei template) (opens in a new tab)
http/cves/2022/CVE-2022-21661.yamlSeverity high
Exploit-DB1 entry
- WordPress Core 5.8.2 - 'WP_Query' SQL Injection (Exploit-DB entry) (opens in a new tab)
EDB-ID 50663webapps, phppublished 13 Jan 2022Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By GitHub_M
- 51 days later
· 51 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.0 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 97.8% · top 0.1% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.0.
Affected products
- affected < 5.8.3
References
References11
- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214 (opens in a new tab)x_refsource_MISCx_transferred
- https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/ (opens in a new tab)x_refsource_MISCx_transferred
- https://www.zerodayinitiative.com/advisories/ZDI-22-020/ (opens in a new tab)x_refsource_MISCx_transferred
- DSA-5039 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- https://www.exploit-db.com/exploits/50663 (opens in a new tab)x_refsource_MISCx_transferred
- http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html (opens in a new tab)x_refsource_MISCx_transferred
- FEDORA-2022-8472dd59ff (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2022-e37e1e6c7a (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- [debian-lts-announce] 20220123 [SECURITY] [DLA 2884-1] wordpress security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661 (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-26878 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-21661)Record last updated .