WordPress core
CVE-2022-21661
WordPress: SQL Injection through WP_Query
- Severity
- High 7.5
- Published
- 6 Jan 2022
- Last changed
- 17 Jun 2026
- Added to UpHeron
- 17 Oct 2026
- Fixed in
- 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.3
- Also known as
- GHSA-6676-cqfm-gw84
- Sources
- NVD, 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.…
Affected software
| Software | Affected versions |
|---|---|
WordPressWordPress core · cpe:a:wordpress:wordpress |
All 23 release lines
|
References
- NVD https://nvd.nist.gov/vuln/detail/CVE-2022-21661
- CVE.org https://www.cve.org/CVERecord?id=CVE-2022-21661
- GitHub Advisory Database https://github.com/advisories/GHSA-6676-cqfm-gw84
- WordPress security advisory https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84