CVE-2022-21661
JSON

8.0high

SQL injection in WordPress

Severity
8.0high CVSS:3.1 by GitHub_M
Exploit likelihood
97.8% (higher than 99% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
BIT-WORDPRESS-2022-21661BIT-WORDPRESS-MULTISITE-2022-21661GHSA-6676-cqfm-gw84

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.

Affected

Product or packageVersionsReported by
WordPress wordpress-develop< 5.8.3CVE List
wordpress wordpressfrom 3.7 before 3.7.37, from 3.8 before 3.8.37, from 3.9 before 3.9.35, from 4.0 before 4.0.34, from 4.1 before 4.1.34, from 4.2 before 4.2.31, from 4.3 before 4.3.27, from 4.4 before 4.4.26 and 14 moreNVD
fedoraproject fedora34, 35NVD
debian debian_linux9.0, 10.0, 11.0NVD
wordpress (Bitnami)from 3.7.0 before 3.7.37, from 3.8.0 before 3.8.37, from 3.9.0 before 3.9.35, from 4.0.0 before 4.0.34, from 4.1.0 before 4.1.34, from 4.2.0 before 4.2.31, from 4.3.0 before 4.3.27, from 4.4.0 before 4.4.26 and 14 moreBitnami Vulnerability Database
wordpress-multisite (Bitnami)from 3.7.0 before 3.7.37, from 3.8.0 before 3.8.37, from 3.9.0 before 3.9.35, from 4.0.0 before 4.0.34, from 4.1.0 before 4.1.34, from 4.2.0 before 4.2.31, from 4.3.0 before 4.3.27, from 4.4.0 before 4.4.26 and 14 moreBitnami Vulnerability Database

All scores

GitHub_M8.0high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N
Bitnami Vulnerability Databasehigh rating

Classification

CWE-89

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

WordPress es un sistema de administración de contenidos gratuito y de código abierto escrito en PHP y emparejado con una base de datos MariaDB. Debido a un saneo inapropiado en WP_Query, puede haber casos en los que la inyección SQL es posible mediante plugins o temas que lo usan de una manera determinada. Esto ha sido parcheado en WordPress versión 5.8.3. Las versiones más antiguas afectadas también han sido corregidas por medio de un security release, que remonta hasta la versión 3.7.37. Le recomendamos encarecidamente que mantenga habilitadas las actualizaciones automáticas. No se presentan medidas de mitigación conocidas para esta vulnerabilidad.

References

https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84advisory, third-party-advisory
https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214advisory, patch, third-party-advisory
https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/advisory, release-notes, vendor-advisory
https://www.zerodayinitiative.com/advisories/ZDI-22-020/advisory, third-party-advisory, vdb-entry
https://www.debian.org/security/2022/dsa-5039advisory, third-party-advisory, vendor-advisory
https://www.exploit-db.com/exploits/50663advisory, exploit, third-party-advisory, vdb-entry
http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.htmladvisory, exploit, third-party-advisory, vdb-entry
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/advisory, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/advisory, third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2022/01/msg00019.htmladvisory, mailing-list, third-party-advisory
https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661advisory, exploit, third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2022-21661web

Sources

SourceRecordLicence
CVE ListCVE-2022-21661 changed 2024-09-09CVE Terms of Use
NVDCVE-2022-21661 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-WORDPRESS-2022-21661 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-WORDPRESS-MULTISITE-2022-21661 changed 2026-09-08Apache-2.0