CVE-2022-21661 | SQL injection in WordPress

Exp

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.

Published: 2022-01-06 Last update: 2025-08-19 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-21661 is rated High Exploit Risk (87/100): CVSS High severity, with high exploitation likelihood (EPSS 97.80%, 100th percentile). Core evidence: 4 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +7.43% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-21661

EDB-ID Source Kind Published Link
50663 exploit_db edb 2022-01-13 Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-21661

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 90.36% 97.80% +7.43%
2 2026-05-12 90.53% 90.36% -0.16%
3 2026-04-21 90.53%

Full EPSS history (50 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-21661

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.0 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.3 6.0 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]
5.0 2.0 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:N)
No integrity impact.
Availability impact (A:N)
No availability impact.
10.0 2.9 [email protected]

Weakness enumeration for CVE-2022-21661

OS Trackers for CVE-2022-21661

vendor priority summary link
debian not yet assigned CVE-2022-21661 not yet assigned priority: Debian including 1 source packages (wordpress), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-21661
ubuntu medium CVE-2022-21661 medium priority: Ubuntu including 1 source packages (wordpress), 15 status rows across 15 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 8, ignored 3, needs-triage 3, released 1. https://ubuntu.com/security/CVE-2022-21661

Affected software / configurations for CVE-2022-21661

Vendor Product Version Raw CPE
wordpress wordpress >= 3.7, < 3.7.37 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 3.8, < 3.8.37 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 3.9, < 3.9.35 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.0, < 4.0.34 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.1, < 4.1.34 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.2, < 4.2.31 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.3, < 4.3.27 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.4, < 4.4.26 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.5, < 4.5.25 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.6, < 4.6.22 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.7, < 4.7.22 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.8, < 4.8.18 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 4.9, < 4.9.19 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.0, < 5.0.15 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.1, < 5.1.12 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.2, < 5.2.14 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.3, < 5.3.11 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.4, < 5.4.9 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.5, < 5.5.8 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.6, < 5.6.7 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.7, < 5.7.5 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
wordpress wordpress >= 5.8, < 5.8.3 cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

References for CVE-2022-21661

URL Tags
http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html Exploit Third Party Advisory VDB Entry
https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214 Patch Third Party Advisory
https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84 Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/ Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/ Third Party Advisory
https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/ Release Notes Vendor Advisory
https://www.debian.org/security/2022/dsa-5039 Third Party Advisory
https://www.exploit-db.com/exploits/50663 Exploit Third Party Advisory VDB Entry
https://www.zerodayinitiative.com/advisories/ZDI-22-020/ Third Party Advisory VDB Entry
https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661 Exploit Third Party Advisory
cvelogic Threat Intelligence