{"id":"CVE-2022-21661","aliases":["BIT-wordpress-2022-21661","BIT-wordpress-multisite-2022-21661","DEBIAN-CVE-2022-21661","DLA-2884-1","DSA-5039-1","EUVD-2022-26878","GHSA-6676-cqfm-gw84","UBUNTU-CVE-2022-21661"],"status":"published","title":"SQL injection in WordPress","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.","severity":{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.97795,"percentile":0.99906,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-89"],"published":"2022-01-06T22:50:11Z","modified":"2026-11-03T08:02:52Z","exploits":[{"source":"exploitdb","id":"EDB-50663","title":"WordPress Core 5.8.2 - 'WP_Query' SQL Injection","type":"webapps","platform":"php","date":"2022-01-13","url":"https://www.exploit-db.com/exploits/50663"},{"source":"pocgithub","id":"purple-WL/wordpress-CVE-2022-21661","title":"purple-WL/wordpress-CVE-2022-21661","date":"2022-02-12","url":"https://github.com/purple-WL/wordpress-CVE-2022-21661"},{"source":"pocgithub","id":"0x4E0x650x6F/Wordpress-cve-CVE-2022-21661","title":"0x4E0x650x6F/Wordpress-cve-CVE-2022-21661","date":"2022-05-28","url":"https://github.com/0x4E0x650x6F/Wordpress-cve-CVE-2022-21661"},{"source":"pocgithub","id":"z92g/CVE-2022-21661","title":"z92g/CVE-2022-21661","date":"2022-07-28","url":"https://github.com/z92g/CVE-2022-21661"},{"source":"pocgithub","id":"guestzz/CVE-2022-21661","title":"guestzz/CVE-2022-21661","date":"2022-07-31","url":"https://github.com/guestzz/CVE-2022-21661"},{"source":"pocgithub","id":"safe3s/CVE-2022-21661","title":"safe3s/CVE-2022-21661","date":"2022-11-08","url":"https://github.com/safe3s/CVE-2022-21661"},{"source":"pocgithub","id":"WellingtonEspindula/SSI-CVE-2022-21661","title":"WellingtonEspindula/SSI-CVE-2022-21661","date":"2023-01-13","url":"https://github.com/WellingtonEspindula/SSI-CVE-2022-21661"},{"source":"pocgithub","id":"daniel616/CVE-2022-21661-Demo","title":"daniel616/CVE-2022-21661-Demo","date":"2023-02-08","url":"https://github.com/daniel616/CVE-2022-21661-Demo"},{"source":"pocgithub","id":"sealldeveloper/CVE-2022-21661-PoC","title":"sealldeveloper/CVE-2022-21661-PoC","date":"2023-04-27","url":"https://github.com/sealldeveloper/CVE-2022-21661-PoC"},{"source":"pocgithub","id":"p4ncontomat3/CVE-2022-21661","title":"p4ncontomat3/CVE-2022-21661","date":"2024-01-04","url":"https://github.com/p4ncontomat3/CVE-2022-21661"},{"source":"pocgithub","id":"CharonDefalt/WordPress--CVE-2022-21661","title":"CharonDefalt/WordPress--CVE-2022-21661","date":"2024-03-24","url":"https://github.com/CharonDefalt/WordPress--CVE-2022-21661"},{"source":"pocgithub","id":"w0r1i0g1ht/CVE-2022-21661","title":"w0r1i0g1ht/CVE-2022-21661","date":"2024-11-12","url":"https://github.com/w0r1i0g1ht/CVE-2022-21661"},{"source":"pocgithub","id":"Fauzan-Aldi/CVE-2022-21661","title":"Fauzan-Aldi/CVE-2022-21661","date":"2025-05-13","url":"https://github.com/Fauzan-Aldi/CVE-2022-21661"},{"source":"pocgithub","id":"7rootsec/CVE-2022-21661-Technical-Analysis","title":"7rootsec/CVE-2022-21661-Technical-Analysis","date":"2026-03-01","url":"https://github.com/7rootsec/CVE-2022-21661-Technical-Analysis"},{"source":"nuclei","id":"CVE-2022-21661","title":"WordPress \u003c5.8.3 - SQL Injection","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-21661.yaml"}],"fixes":[{"ecosystem":"Bitnami","package":"wordpress","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"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"wordpress-multisite","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"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"wordpress","fixed_in":["5.8.3+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"wordpress","fixed_in":["5.8.3+dfsg1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"wordpress","fixed_in":["5.8.3+dfsg1-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Bitnami","package":"wordpress","ranges":[{"type":"SEMVER","events":[{"introduced":"3.7.0"},{"fixed":"3.7.37"},{"introduced":"3.8.0"},{"fixed":"3.8.37"},{"introduced":"3.9.0"},{"fixed":"3.9.35"},{"introduced":"4.0.0"},{"fixed":"4.0.34"},{"introduced":"4.1.0"},{"fixed":"4.1.34"},{"introduced":"4.2.0"},{"fixed":"4.2.31"},{"introduced":"4.3.0"},{"fixed":"4.3.27"},{"introduced":"4.4.0"},{"fixed":"4.4.26"},{"introduced":"4.5.0"},{"fixed":"4.5.25"},{"introduced":"4.6.0"},{"fixed":"4.6.22"},{"introduced":"4.7.0"},{"fixed":"4.7.22"},{"introduced":"4.8.0"},{"fixed":"4.8.18"},{"introduced":"4.9.0"},{"fixed":"4.9.19"},{"introduced":"5.0.0"},{"fixed":"5.0.15"},{"introduced":"5.1.0"},{"fixed":"5.1.12"},{"introduced":"5.2.0"},{"fixed":"5.2.14"},{"introduced":"5.3.0"},{"fixed":"5.3.11"},{"introduced":"5.4.0"},{"fixed":"5.4.9"},{"introduced":"5.5.0"},{"fixed":"5.5.8"},{"introduced":"5.6.0"},{"fixed":"5.6.7"},{"introduced":"5.7.0"},{"fixed":"5.7.5"},{"introduced":"5.8.0"},{"fixed":"5.8.3"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"wordpress-multisite","ranges":[{"type":"SEMVER","events":[{"introduced":"3.7.0"},{"fixed":"3.7.37"},{"introduced":"3.8.0"},{"fixed":"3.8.37"},{"introduced":"3.9.0"},{"fixed":"3.9.35"},{"introduced":"4.0.0"},{"fixed":"4.0.34"},{"introduced":"4.1.0"},{"fixed":"4.1.34"},{"introduced":"4.2.0"},{"fixed":"4.2.31"},{"introduced":"4.3.0"},{"fixed":"4.3.27"},{"introduced":"4.4.0"},{"fixed":"4.4.26"},{"introduced":"4.5.0"},{"fixed":"4.5.25"},{"introduced":"4.6.0"},{"fixed":"4.6.22"},{"introduced":"4.7.0"},{"fixed":"4.7.22"},{"introduced":"4.8.0"},{"fixed":"4.8.18"},{"introduced":"4.9.0"},{"fixed":"4.9.19"},{"introduced":"5.0.0"},{"fixed":"5.0.15"},{"introduced":"5.1.0"},{"fixed":"5.1.12"},{"introduced":"5.2.0"},{"fixed":"5.2.14"},{"introduced":"5.3.0"},{"fixed":"5.3.11"},{"introduced":"5.4.0"},{"fixed":"5.4.9"},{"introduced":"5.5.0"},{"fixed":"5.5.8"},{"introduced":"5.6.0"},{"fixed":"5.6.7"},{"introduced":"5.7.0"},{"fixed":"5.7.5"},{"introduced":"5.8.0"},{"fixed":"5.8.3"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.3+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.3+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.3+dfsg1-1"}]}]},{"source":"osv","ecosystem":"Debian:9","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.7.22+dfsg-0+deb9u1"}]}],"versions":["4.7.18+dfsg-1+deb9u1","4.7.19+dfsg-1+deb9u1","4.7.20+dfsg-1+deb9u1","4.7.21+dfsg-0+deb9u1","4.7.5+dfsg-2","4.7.5+dfsg-2+deb9u1","4.7.5+dfsg-2+deb9u1~bpo8+1","4.7.5+dfsg-2+deb9u2","4.7.5+dfsg-2+deb9u2~bpo8+1","4.7.5+dfsg-2+deb9u3","4.7.5+dfsg-2+deb9u4","4.7.5+dfsg-2+deb9u5","4.7.5+dfsg-2+deb9u6"],"bundled":4},{"source":"osv","ecosystem":"Debian:10","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.0.15+dfsg1-0+deb10u1"}]}],"versions":["5.0.10+dfsg1-0+deb10u1","5.0.11+dfsg1-0+deb10u1","5.0.12+dfsg1-0+deb10u1","5.0.14+dfsg1-0+deb10u1","5.0.4+dfsg1-1","5.0.4+dfsg1-1+deb10u1","5.0.4+dfsg1-1+deb10u2"],"bundled":4},{"source":"osv","ecosystem":"Debian:11","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.5+dfsg1-0+deb11u1"}]}],"versions":["5.7.1+dfsg1-2","5.7.3+dfsg1-0+deb11u1"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.3+dfsg-1","4.3.1+dfsg-1","4.4+dfsg-1","4.4.1+dfsg-1","4.4.2+dfsg-1","4.4.2+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.8.2+dfsg-2","4.8.3+dfsg-1","4.9.1+dfsg-1","4.9.2+dfsg-1","4.9.4+dfsg-1","4.9.5+dfsg1-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"wordpress","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.2+dfsg1-1","5.2.4+dfsg1-1","5.3.2+dfsg1-1","5.3.2+dfsg1-1ubuntu1"]}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"wordpress","product":"wordpress"},{"vendor":"wordpress","product":"wordpress-develop"}],"references":[{"url":"https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","advisory","fix","report"]},{"url":"https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","web","report"]},{"url":"https://www.zerodayinitiative.com/advisories/ZDI-22-020/","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","VDB Entry","advisory","report"]},{"url":"https://www.debian.org/security/2022/dsa-5039","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://www.exploit-db.com/exploits/50663","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","article"]},{"url":"https://www.vicarius.io/vsociety/posts/understanding-the-wordpress-sql-injection-vulnerability-cve-2022-21661","tags":["Exploit","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21661","tags":["web","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21661.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-21661","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-21661","tags":["report"]},{"url":"https://hackerone.com/reports/1378209","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-21661","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-21661","title":"SQL injection in WordPress","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.","status":"published","published":"2022-01-06T22:50:11Z","modified":"2024-09-09T14:13:15.875Z","cvss":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:34:29.057251Z"}],"euvd":[{"id":"EUVD-2022-26878","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.","status":"published","published":"2022-01-06T22:50:11Z","modified":"2024-09-09T14:13:15Z","cvss":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T00:56:00.719005Z"}],"nvd":[{"id":"CVE-2022-21661","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.","status":"published","published":"2022-01-06T23:15:07.933Z","modified":"2026-06-17T04:26:42.513Z","cvss":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:07:10.836864Z"}],"osv":[{"id":"CVE-2022-21661","title":"SQL injection in WordPress","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.","status":"published","published":"2022-01-06T22:50:11Z","modified":"2026-10-28T02:30:21.840701677Z","cvss":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:44:23.655778Z"},{"id":"DEBIAN-CVE-2022-21661","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.","status":"published","published":"2022-01-06T23:15:07.933Z","modified":"2026-11-03T08:02:52.9851477Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-03T08:24:39.643572Z"},{"id":"UBUNTU-CVE-2022-21661","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.","status":"published","published":"2022-01-06T23:15:00Z","modified":"2025-10-24T04:53:26Z","cvss":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T16:53:52.391598Z"},{"id":"BIT-wordpress-2022-21661","title":"SQL injection in WordPress","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.","status":"published","published":"2024-03-06T11:10:19.099Z","modified":"2026-09-08T08:48:22.362410352Z","updated_at":"2026-11-02T15:28:36.455807Z"},{"id":"BIT-wordpress-multisite-2022-21661","title":"SQL injection in WordPress","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.","status":"published","published":"2024-03-06T11:10:04.396Z","modified":"2026-09-08T08:48:21.666591335Z","updated_at":"2026-11-02T15:28:36.455807Z"},{"id":"DLA-2884-1","title":"wordpress - security update","status":"published","published":"2022-01-17T00:00:00Z","modified":"2026-03-09T01:19:53.47555Z","updated_at":"2026-11-02T15:46:11.189256Z"},{"id":"DSA-5039-1","title":"wordpress - security update","status":"published","published":"2022-01-11T00:00:00Z","modified":"2026-03-09T02:11:35.180666Z","updated_at":"2026-11-02T15:46:17.543497Z"}]}}
