cve.bz

CVE-2022-21661 SQL Injection

7.5 highExploitEPSS 98%Fix available

High (7.5). EPSS 98% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
98% (unchanged from 98% a week ago; 98% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-09-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-21661 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-21661?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-21661?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-21661 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
wordpress:wordpressfrom 3.7 before 3.7.37
wordpress:wordpressfrom 3.8 before 3.8.37
wordpress:wordpressfrom 3.9 before 3.9.35
wordpress:wordpressfrom 4.0 before 4.0.34
wordpress:wordpressfrom 4.1 before 4.1.34
wordpress:wordpressfrom 4.2 before 4.2.31
wordpress:wordpressfrom 4.3 before 4.3.27
wordpress:wordpressfrom 4.4 before 4.4.26
wordpress:wordpressfrom 4.5 before 4.5.25
wordpress:wordpressfrom 4.6 before 4.6.22
wordpress:wordpressfrom 4.7 before 4.7.22
wordpress:wordpressfrom 4.8 before 4.8.18
wordpress:wordpressfrom 4.9 before 4.9.19
wordpress:wordpressfrom 5.0 before 5.0.15
wordpress:wordpressfrom 5.1 before 5.1.12
wordpress:wordpressfrom 5.2 before 5.2.14
wordpress:wordpressfrom 5.3 before 5.3.11
wordpress:wordpressfrom 5.4 before 5.4.9
wordpress:wordpressfrom 5.5 before 5.5.8
wordpress:wordpressfrom 5.6 before 5.6.7
wordpress:wordpressfrom 5.7 before 5.7.5
wordpress:wordpressfrom 5.8 before 5.8.3
fedoraproject:fedora34
fedoraproject:fedora35
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9wordpress4.7.22+dfsg-0+deb9u1DLA-2884-1
Debian10wordpress5.0.15+dfsg1-0+deb10u1DSA-5039-1
Debian11wordpress5.7.5+dfsg1-0+deb11u1DSA-5039-1
Debian12, 13, 14wordpress5.8.3+dfsg1-1DEBIAN-CVE-2022-21661
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTSwordpressno fix listedUBUNTU-CVE-2022-21661

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Public exploits

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON