Skip to main content
Exploitation reportedNot in CISA KEV yetFix available

CVE-2022-21661

Exploitation reported by one source. First attested on 2023-11-15 by GCVE · shadowserver.

  • Published2022-01-06
  • Fixed in5.8.3 · 5.7.5 · 5.6.7 · 5.5.8 · 5.4.9 · 5.3.11
  • WeaknessCWE-89

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-01-0623:15CVE publishedNVD
  2. 2022-01-13Exploit-DB entryExploit-DB
  3. 2023-11-1523:17Listed as exploited by GCVEGCVE
  4. 2023-11-1523:17Exploitation first reportedGCVE

Observed activity

isMalicious corpus · updated 2026-11-03 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2022-21661?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2022-21661?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
WordPress
BranchAffectedFixed in
5.8≥ 5.8, < 5.8.35.8.3
5.8≥ 5.8.0, < 5.8.35.8.3
5.7≥ 5.7, < 5.7.55.7.5
5.7≥ 5.7.0, < 5.7.55.7.5
5.6≥ 5.6, < 5.6.75.6.7
5.6≥ 5.6.0, < 5.6.75.6.7
5.5≥ 5.5, < 5.5.85.5.8
5.5≥ 5.5.0, < 5.5.85.5.8
5.4≥ 5.4, < 5.4.95.4.9
5.4≥ 5.4.0, < 5.4.95.4.9
5.3≥ 5.3, < 5.3.115.3.11
5.3≥ 5.3.0, < 5.3.115.3.11
Debian debian linux
BranchAffectedFixed in
9.0= 9.0no fix published
10.0= 10.0no fix published
11.0= 11.0no fix published
Fedoraproject fedora
BranchAffectedFixed in
34.x= 34no fix published
35.x= 35no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • wordpress-develop
    Affected
    • = < 5.8.3no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2022-01-23

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • wordpressUbuntu:20.04:LTSall versions · no fixed version listed
  • wordpressUbuntu:18.04:LTSall versions · no fixed version listed
  • wordpressUbuntu:16.04:LTSall versions · no fixed version listed
  • wordpressDebian:14all versions · fixed in 5.8.3+dfsg1-1
  • wordpressDebian:13all versions · fixed in 5.8.3+dfsg1-1
  • wordpressDebian:12all versions · fixed in 5.8.3+dfsg1-1
  • wordpressDebian:11all versions · fixed in 5.7.5+dfsg1-0+deb11u1
  • wordpressDebian:10all versions · fixed in 5.0.15+dfsg1-0+deb10u1

1 more package range on OSV.dev

Vendor advisories

  • CVE-2022-21661 Red Hat Product Security

    wordpress: SQL injection via WP_Query

Full record on NVD

Fix

  1. Update WordPress to 5.8.3 · 5.7.5 · 5.6.7 · 5.5.8 · 5.4.9 · 5.3.11

Advisories and patches

Detection

read 2026-11-03 22:42 UTC
Nuclei template
available
ProjectDiscovery
Exploit-DB
EDB-50663
Exploit-DB
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2022-01-06
Last Modified
2026-06-17
NVD status
Analyzed
GitHub Advisory
GHSA-6676-cqfm-gw84

Frequently asked questions

What is 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.

Is CVE-2022-21661 actively exploited?

A proof-of-concept exploit exists for CVE-2022-21661, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-21661?

CVE-2022-21661 has a CVSS v3 base score of 7.5 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running WordPress? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record