CVE-2022-21661 is a high-severity (CVSS 8) SQL Injection vulnerability in wordpress. 20 public exploit references exist, so weaponization risk is real. A fix is available for wordpress — see the affected versions and patch details below.
SQL injection in WordPress
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-21661.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2022-21661 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 395,249 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
wordpressReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Bitnami packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦Bitnami | wordpress | ≥ 3.7.0&&< 3.7.37 | 3.7.37 |
Affected Products
debian linuxdebianfedorafedoraprojectwordpresswordpressResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
WordPress Core 5.8.2 - 'WP_Query' SQL Injection
by Aryan Chehreghani · Jan 13, 2022
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wordpress, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update wordpress to 3.7.37 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21661 is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
How to detect CVE-2022-21661
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2022-21661 -u https://target- Template
- WordPress <5.8.3 - SQL Injection
- Severity
- high
- Impact
- Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data manipulation, or data leakage.
- Remediation
- This has been patched in 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.
Template by ProjectDiscovery nuclei-templates (Marcio Mendes), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2022-21661 in your dependencies?
Find it across Bitnami, including transitive dependencies.