{"id":"CVE-2022-21661","url":"https://www.cyber-defence.io/tools/cve/CVE-2022-21661","generatedAt":"2026-11-05T00:48:29.797Z","title":"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.","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.","published":"2022-01-06T23:15:08.000Z","lastModified":"2026-06-17T04:26:43.000Z","status":"Analyzed","sourceIdentifier":"security-advisories@github.com","cvss":{"version":"3.1","score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"},"cwe":["CWE-89"],"affected":["wordpress/wordpress","fedoraproject/fedora","debian/debian linux"],"epss":{"score":0.97795,"percentile":0.99906,"date":"2026-11-03","history":[]},"kev":{"listed":false},"exploits":{"count":1,"verified":false,"firstPublished":"2022-01-13","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":50663,"kind":"exploit","title":"WordPress Core 5.8.2 - 'WP_Query' SQL Injection","url":"https://www.exploit-db.com/exploits/50663","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/webapps/50663.txt","file":"exploits/php/webapps/50663.txt","published":"2022-01-13","added":"2022-01-13","updated":"2022-01-13","author":"Aryan Chehreghani","type":"webapps","platform":"php","port":null,"verified":false,"codes":["CVE-2022-21661"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null}]},"verdict":{"level":"urgent","text":"EPSS puts the probability of exploitation in the next 30 days at 97.8%, higher than 100% of all known CVEs. Patch or mitigate before the next change window."},"changes":[],"references":[{"url":"http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"security-advisories@github.com"},{"url":"https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214","tags":["Patch","Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84","tags":["Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html","tags":["Mailing List","Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/","tags":["Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/","tags":["Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/","tags":["Release Notes","Vendor Advisory"],"source":"security-advisories@github.com"},{"url":"https://www.debian.org/security/2022/dsa-5039","tags":["Third Party Advisory"],"source":"security-advisories@github.com"},{"url":"https://www.exploit-db.com/exploits/50663","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"security-advisories@github.com"},{"url":"https://www.zerodayinitiative.com/advisories/ZDI-22-020/","tags":["Third Party Advisory","VDB Entry"],"source":"security-advisories@github.com"},{"url":"http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214","tags":["Patch","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/","tags":["Release Notes","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.debian.org/security/2022/dsa-5039","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/50663","tags":["Exploit","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661","tags":["Exploit","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.zerodayinitiative.com/advisories/ZDI-22-020/","tags":["Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-21661","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}