Every CVE Search/ Get API key

CVE-2022-21661

SQL injection in WordPress

8.0 HighPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

97.8%Up 86.6 points since Feb 8, 2022
90%50%10%1%

What each source reports

CVE List Score used 8.0

SQL injection in WordPress

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.

Record
CVE-2022-21661
CVSS 3.1
8.0 HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-89
Updated
2026-11-02
EUVDEUVD-2022-26878 8.0

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.

Record
EUVD-2022-26878
CVSS 3.1
8.0 HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-03
NVD 8.0

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.

Record
CVE-2022-21661
CVSS 3.1
8.0 HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:P/I:N/A:N
Weakness
CWE-89
Updated
2026-11-02
OSV 8.0

SQL injection in WordPress

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.

Record
CVE-2022-21661
CVSS 3.1
8.0 HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-89
Updated
2026-11-02
OSVDEBIAN-CVE-2022-21661 7.5

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.

Record
DEBIAN-CVE-2022-21661
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-03
OSVUBUNTU-CVE-2022-21661 8.0

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.

Record
UBUNTU-CVE-2022-21661
CVSS 3.1
8.0 HighCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVBIT-wordpress-2022-21661 No score

SQL injection in WordPress

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.

Record
BIT-wordpress-2022-21661
Updated
2026-11-02
OSVBIT-wordpress-multisite-2022-21661 No score

SQL injection in WordPress

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.

Record
BIT-wordpress-multisite-2022-21661
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
wordpress
Bitnami
3.7.0 up to 3.7.37, 3.8.0 up to 3.8.37, 3.9.0 up to 3.9.35, 4.0.0 up to 4.0.34, 4.1.0 up to 4.1.34, 4.2.0 up to 4.2.31, 4.3.0 up to 4.3.27, 4.4.0 up to 4.4.26, 4.5.0 up to 4.5.25, 4.6.0 up to 4.6.22, 4.7.0 up to 4.7.22, 4.8.0 up to 4.8.18, 4.9.0 up to 4.9.19, 5.0.0 up to 5.0.15, 5.1.0 up to 5.1.12, 5.2.0 up to 5.2.14, 5.3.0 up to 5.3.11, 5.4.0 up to 5.4.9, 5.5.0 up to 5.5.8, 5.6.0 up to 5.6.7, 5.7.0 up to 5.7.5, 5.8.0 up to 5.8.3
3.7.373.8.373.9.354.0.344.1.344.2.314.3.274.4.264.5.254.6.224.7.224.8.184.9.195.0.155.1.125.2.145.3.115.4.95.5.85.6.75.7.55.8.3
wordpress-multisite
Bitnami
3.7.0 up to 3.7.37, 3.8.0 up to 3.8.37, 3.9.0 up to 3.9.35, 4.0.0 up to 4.0.34, 4.1.0 up to 4.1.34, 4.2.0 up to 4.2.31, 4.3.0 up to 4.3.27, 4.4.0 up to 4.4.26, 4.5.0 up to 4.5.25, 4.6.0 up to 4.6.22, 4.7.0 up to 4.7.22, 4.8.0 up to 4.8.18, 4.9.0 up to 4.9.19, 5.0.0 up to 5.0.15, 5.1.0 up to 5.1.12, 5.2.0 up to 5.2.14, 5.3.0 up to 5.3.11, 5.4.0 up to 5.4.9, 5.5.0 up to 5.5.8, 5.6.0 up to 5.6.7, 5.7.0 up to 5.7.5, 5.8.0 up to 5.8.3
3.7.373.8.373.9.354.0.344.1.344.2.314.3.274.4.264.5.254.6.224.7.224.8.184.9.195.0.155.1.125.2.145.3.115.4.95.5.85.6.75.7.55.8.3
wordpress
Debian:12
before 5.8.3+dfsg1-1
5.8.3+dfsg1-1
wordpress
Debian:13
before 5.8.3+dfsg1-1
5.8.3+dfsg1-1
wordpress
Debian:14
before 5.8.3+dfsg1-1
5.8.3+dfsg1-1
wordpress
Debian:9
From an advisory covering 4 CVEs
before 4.7.22+dfsg-0+deb9u1, plus listed versions
4.7.18+dfsg-1+deb9u14.7.19+dfsg-1+deb9u14.7.20+dfsg-1+deb9u14.7.21+dfsg-0+deb9u14.7.5+dfsg-2
Show 8 moreShow less
4.7.5+dfsg-2+deb9u14.7.5+dfsg-2+deb9u1~bpo8+14.7.5+dfsg-2+deb9u24.7.5+dfsg-2+deb9u2~bpo8+14.7.5+dfsg-2+deb9u34.7.5+dfsg-2+deb9u44.7.5+dfsg-2+deb9u54.7.5+dfsg-2+deb9u6
4.7.22+dfsg-0+deb9u1
wordpress
Debian:10
From an advisory covering 4 CVEs
before 5.0.15+dfsg1-0+deb10u1, plus listed versions
5.0.10+dfsg1-0+deb10u15.0.11+dfsg1-0+deb10u15.0.12+dfsg1-0+deb10u15.0.14+dfsg1-0+deb10u15.0.4+dfsg1-15.0.4+dfsg1-1+deb10u15.0.4+dfsg1-1+deb10u2
5.0.15+dfsg1-0+deb10u1
wordpress
Debian:11
From an advisory covering 4 CVEs
before 5.7.5+dfsg1-0+deb11u1, plus listed versions
5.7.1+dfsg1-25.7.3+dfsg1-0+deb11u1
5.7.5+dfsg1-0+deb11u1
wordpress
Ubuntu:16.04:LTS
All versions, plus listed versions
4.3+dfsg-14.3.1+dfsg-14.4+dfsg-14.4.1+dfsg-14.4.2+dfsg-14.4.2+dfsg-1ubuntu1
None known
wordpress
Ubuntu:18.04:LTS
All versions, plus listed versions
4.8.2+dfsg-24.8.3+dfsg-14.9.1+dfsg-14.9.2+dfsg-14.9.4+dfsg-14.9.5+dfsg1-1
None known
wordpress
Ubuntu:20.04:LTS
All versions, plus listed versions
5.2.2+dfsg1-15.2.4+dfsg1-15.3.2+dfsg1-15.3.2+dfsg1-1ubuntu1
None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
Exploit-DBWordPress Core 5.8.2 - 'WP_Query' SQL Injection2022-01-13
PoC in GitHubpurple-WL/wordpress-CVE-2022-216612022-02-12
PoC in GitHub0x4E0x650x6F/Wordpress-cve-CVE-2022-216612022-05-28
PoC in GitHubz92g/CVE-2022-216612022-07-28
PoC in GitHubguestzz/CVE-2022-216612022-07-31
PoC in GitHubsafe3s/CVE-2022-216612022-11-08
PoC in GitHubWellingtonEspindula/SSI-CVE-2022-216612023-01-13
PoC in GitHubdaniel616/CVE-2022-21661-Demo2023-02-08
PoC in GitHubsealldeveloper/CVE-2022-21661-PoC2023-04-27
PoC in GitHubp4ncontomat3/CVE-2022-216612024-01-04
Show 5 moreShow less
Public exploits
SourceLinkDate
PoC in GitHubCharonDefalt/WordPress--CVE-2022-216612024-03-24
PoC in GitHubw0r1i0g1ht/CVE-2022-216612024-11-12
PoC in GitHubFauzan-Aldi/CVE-2022-216612025-05-13
PoC in GitHub7rootsec/CVE-2022-21661-Technical-Analysis2026-03-01
NucleiWordPress <5.8.3 - SQL Injection

History

History
RecordedChangedSources
affected, factsOSV
exploitsOSV
aliasesEUVD
first indexedCVE List, Exploit-DB, Nuclei, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-21661 is a high vulnerability (CVSS 8.0) in Wordpress, published January 6, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 97.8%, the 99th percentile. Fixed in wordpress 3.7.37.

References

Show 11 moreShow less
MoveEnter Open