# What is CVE-2022-21661?

> CVE-2022-21661 is a high-severity flaw (CVSS 7.5) in WordPress, published on 6 January 2022. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 98%. If you run an affected version, plan in the vendor’s fix.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2022-21661

## At a glance

- **Verdict:** Fix this soon. Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.
- **Precursor Intelligence risk score:** 70 out of 100 (High); action: Emergency patch. Kept up to date as the evidence changes.
- **Severity:** High (CVSS 7.5 out of 10)
- **Known to be exploited:** No, not on the list of flaws known to be exploited today
- **Chance of use in the next 30 days:** 98% (latest exploit-likelihood forecast)
- **Published:** 6 January 2022
- **Record last updated:** 7 November 2023
- **Main product:** WordPress
- **Affected products:** 3

## What is CVE-2022-21661? In plain terms

It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can read data.

### The official 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 kind of flaw is it?

- CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

### How an attack on it works

- Where an attacker can be: Anywhere on the internet
- How hard it is to pull off: Easy: no special conditions
- Login needed first: No login needed
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can read data

Severity vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## Is CVE-2022-21661 being exploited? Not that we know of

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 98%. That can change at any time, which is why we keep watching.

Exploit likelihood over the last 7 days: 98%, 98%, 98%, 98%, 98%, 98%, 98%.

### Timeline

- 6 January 2022: Published
- 7 November 2023: Record last updated

### How Precursor Intelligence ranks it

CVE-2022-21661 scores **70 out of 100 (High)**, with the action "Emergency patch".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2022-21661?

The published record lists 3 products. Versions are as published: "before 5.8.3" means every version up to, but not including, 5.8.3.

- [WordPress](https://www.precursorintelligence.com/product/wordpress/wordpress) by [WordPress](https://www.precursorintelligence.com/vendors/wordpress) (Application): before 5.8.3
- [Debian Linux](https://www.precursorintelligence.com/product/debian/debian_linux) by [Debian](https://www.precursorintelligence.com/vendors/debian) (Operating system): 9.0, 10.0, 11.0
- [Fedora](https://www.precursorintelligence.com/product/fedoraproject/fedora) by [Fedoraproject](https://www.precursorintelligence.com/vendors/fedoraproject) (Operating system): 34, 35

## How do I fix CVE-2022-21661?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Keep an eye on it.** Track the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.

### References

- [github.com](https://github.com/WordPress/wordpress-develop/commit/17efac8c8ec64555eff5cf51a3eff81e06317214) (Patch, Third-party advisory)
- [wordpress.org](https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/) (Release notes, Vendor advisory)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html) (Exploit, Third-party advisory, Vulnerability database)
- [github.com](https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-6676-cqfm-gw84) (Third-party advisory)
- [lists.debian.org](https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html) (Mailing list, Third-party advisory)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4UNEC63UU5GEU47IIR4RMTZAHNEOJG/)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DM6XPH3JN6V4NF4WBOJTOXZIVE6VKKE3/)
- [debian.org](https://www.debian.org/security/2022/dsa-5039) (Third-party advisory)
- [exploit-db.com](https://www.exploit-db.com/exploits/50663) (Exploit, Third-party advisory, Vulnerability database)
- [zerodayinitiative.com](https://www.zerodayinitiative.com/advisories/ZDI-22-020/) (Third-party advisory, Vulnerability database)

## Questions

### What is CVE-2022-21661?

CVE-2022-21661 is a high-severity flaw in WordPress, published on 6 January 2022. It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can read data.

### How serious is CVE-2022-21661?

It scores 7.5 out of 10 on the CVSS severity scale, which is high. Our risk score for CVE-2022-21661 is 70 out of 100, which is High. Its action is "Emergency patch". Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.

### Is CVE-2022-21661 being exploited?

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 98%. That can change at any time, which is why we keep watching.

### Which versions does CVE-2022-21661 affect?

For WordPress: before 5.8.3. The record lists 3 products in all, each with its versions, under "Who is affected" on this page.

### How do I fix CVE-2022-21661?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.

## Does CVE-2022-21661 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

