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 pos

high Affects WordPress core. Feed 2026.11.23.2, updated 2026-11-23; published ; advisory modified .

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 pos

Package
WordPress core WordPress
Affected versions
>=3.7 and <3.7.37 or >=3.8 and <3.8.37 or >=3.9 and <3.9.35 or >=4.0 and <4.0.34 or >=4.1 and <4.1.34 or >=4.2 and <4.2.31 or >=4.3 and <4.3.27 or >=4.4 and <4.4.26 or >=4.5 and <4.5.25 or >=4.6 and <4.6.22 or >=4.7 and <4.7.22 or >=4.8 and <4.8.18 or >=4.9 and <4.9.19 or >=5.0 and <5.0.15 or >=5.1 and <5.1.12 or >=5.2 and <5.2.14 or >=5.3 and <5.3.11 or >=5.4 and <5.4.9 or >=5.5 and <5.5.8 or >=5.6 and <5.6.7 or >=5.7 and <5.7.5 or >=5.8 and <5.8.3
Fixed in
3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.3
Severity
high  CVSS 8.0
Exploitation
not on CISA KEV · EPSS 98% (99.9th percentile)
Published
2022-01-06
Source
nvd

References

CWE-89
NVD recordWordPress core advisories

Quick answers

Is CVE-2022-21661 being actively exploited?

It is not on CISA's Known Exploited Vulnerabilities list today. FIRST's EPSS model puts the chance of exploitation in the next 30 days at 98%.

Which version fixes CVE-2022-21661?

WordPress core: 3.7.37, 3.8.37, 3.9.35.

How do I check whether I am affected?

Run `phpwarden wordpress /path/to/wordpress`. phpwarden checks the exact version you have installed against this advisory.

Am I affected?

Find out in one command. phpwarden checks your WordPress install against this advisory and 21,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden wordpress /path/to/wordpress

# or, without Composer
pipx install phpwarden   &&   phpwarden wordpress /path/to/wordpress

Or keep it checked automatically with the GitHub Action or a nightly cron; see WordPress docs.

Install docs   How findings are ranked

Related advisories