CVE-2022-21661
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.
- CVSS
- 8.0Highscored by the publisher (CNA)
- Exploited in the wild
- Not knownPublic exploit code; not in CISA KEV
- EPSS
- 97.8%chance of exploitation in the next 30 daystop 0.1% of scored CVEsFIRST score of 11 Nov 2026
- Fix
- Patch availablesee the advisories in the references
- Published
- 6 Jan 2022analysed here 12 Nov 2026
Summary
Triage
The summary, impact and action text on this page are written by our AI analysis pipeline, or taken from the NVD description when a CVE was imported from NVD. They are not the vendor's wording: check them against the sources. A longer AI executive summary and technical analysis are generated for signed-in accounts on the Max plan.
Affected products
| Product | Affected versions | Vendor says fixed in |
|---|---|---|
| WordPress wordpress-develop | < 5.8.3Vendor says fixed in: not stated |
As published in the CVE Program record. A version outside these ranges is not a statement that it is unaffected — vendors sometimes understate a range, and distribution-backported builds carry upstream numbers that do not reflect what was patched into them.
Products named in our analysis
- wordpress:wordpress
- fedoraproject:fedora
- debian:debian_linux
Fix and mitigation
WAF and other mitigations
Can a WAF block it? Yes. SQL injection puts SQL syntax into a request parameter, and WAF signatures recognise that syntax well.
Also consider: parameterized queries · ORM
Based on the weakness type only; no CVE-specific evidence yet. We check Cloudflare, AWS, Google Cloud Armor and Azure; for Akamai, Imperva, Fastly, F5, ask your vendor.
Remediation steps (AI-written)
Step-by-step remediation is generated for accounts on the Max plan, for CVEs that match a technology in their stack. Add this technology to your stack to see the fix checklist.
Exploitation evidence
- CISA KEV catalog
- Not listed as of our last sync.
- Public exploit code
- Yes: 1 on Exploit-DB · 13 GitHub proofs of concept · 1 Nuclei template
- CISA SSVC
- exploitation poc, automatable no, technical impact totalAssessed by CISA 9 Sept 2024 (SSVC 2.0.3). Exploitation is none, poc (public proof of concept) or active.
Exploit-DB
- WordPress Core 5.8.2 - 'WP_Query' SQL Injectionwebapps, 13 Jan 2022
Nuclei
- WordPress <5.8.3 - SQL Injectiondetection template, high
GitHub proofs of concept
- z92g/CVE-2022-2166129 stars
- purple-WL/wordpress-CVE-2022-2166117 stars
- 0x4E0x650x6F/Wordpress-cve-CVE-2022-2166115 stars
- guestzz/CVE-2022-216617 stars
and 9 more repositories
Listed so you can judge urgency, not as a recommendation to run anything. GitHub “proofs of concept” are unvetted: some are fake or carry malware. Exploit-DB marks the entries its staff verified.
Timeline
- 6 Jan 2022Published
- 13 Jan 2022First public exploit or proof of concept6 days later
- 9 Sept 2024CISA SSVC assessment: exploitation poc971 days (about 3 years) later
- 9 Sept 2024CVE record last updatedsame day later
- 12 Nov 2026Analysed by vulneraibility.com794 days (about 2 years) later
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
| Metric | Value | What it means |
|---|---|---|
| Attack vector | NetworkReachable over the internet or any routable network. | Reachable over the internet or any routable network. |
| Attack complexity | HighNeeds specific conditions, a race or a particular configuration. | Needs specific conditions, a race or a particular configuration. |
| Privileges required | HighThe attacker needs admin-level privileges. | The attacker needs admin-level privileges. |
| User interaction | NoneNo victim action needed. | No victim action needed. |
| Scope | ChangedImpact crosses a security boundary into other components. | Impact crosses a security boundary into other components. |
| Confidentiality | HighTotal data disclosure possible. | Total data disclosure possible. |
| Integrity | HighComplete modification possible. | Complete modification possible. |
| Availability | HighFull outage possible. | Full outage possible. |
Common questions
Is CVE-2022-21661 being exploited?
Not confirmed. CVE-2022-21661 does not appear in CISA's Known Exploited Vulnerabilities catalog, which records only exploitation that has been observed and reported publicly. That is evidence of absence of a report, not evidence the flaw is unattacked. EPSS currently estimates a 98% probability of exploitation in the next 30 days.
How severe is CVE-2022-21661?
CVE-2022-21661 is rated High with a CVSS score of 8.0. Severity describes how bad exploitation would be, not how likely it is: pair it with exploitation evidence before deciding what to patch first.
Is there a patch for CVE-2022-21661?
Yes. A fix has been recorded for CVE-2022-21661. The vendor advisory is the authority on the exact fixed version — apply it from there rather than from a summary.
What does CVE-2022-21661 affect?
CVE-2022-21661 affects wordpress:wordpress, fedoraproject:fedora, debian:debian_linux. Confirm the exact affected versions against the vendor advisory before deciding you are exposed.
Exploitation status reflects CISA's KEV catalog as we last synced it. Check the catalog directly.
References
11 references in the CVE record, grouped by the tags the record gives them.
Advisories (3)
- debian.org /security/2022/dsa-5039
- lists.fedoraproject.org /archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF
- lists.fedoraproject.org /archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GE
Other links (8)
- 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/
- exploit-db.com /exploits/50663
- packetstormsecurity.com /files/165540/WordPress-Core-5.8.2-SQL-Injection.html
Show 2 more
- lists.debian.org /debian-lts-announce/2022/01/msg00019.html
- vicarius.io /vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022
Where the data on this page comes from
- CVE List (CVE.org): description, affected versions, references; CVE Terms of Use
- NVD: CVSS and CPE data
- CISA Vulnrichment (ADP): SSVC decision points
- FIRST EPSS: exploit probability and percentile
- Exploit-DB: published exploits
- Nuclei templates: detection templates
- PoC-in-GitHub: GitHub repositories that claim a proof of concept
Summary, impact and triage tags: written by our AI analysis pipeline from the sources above. Check them against the sources.
Similar CVEs
Get CVEs like this by email. Join the free digest: the CVEs we flag as major, all CVSS 8.0 or higher, in up to three emails a day (sent at 05:00, 11:00 and 15:00 UTC). Matching alerts to the products you run needs an account, and accounts are invite-only during the beta.