BREACHSPIDER
CVE databaseVendorsIntelFeaturesDevelopersDocsPricingSign inStart free trial

CVE-2022-21661 in Debian Linux and 2 more products

High 7.5 Public exploit reported

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

Affects 3 products from 3 vendors. Facts below cite their sources.

CVSS 3.17.5
EPSS97.8%
EPSS percentile100th
FixSee advisory

Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.

Affected products and versions

VendorProductAffected versions
Debian Debian Linux 9.0 10.0 11.0
Fedoraproject Fedora 34 35
Wordpress Wordpress ≥ 3.7, < 3.7.37 ≥ 3.8, < 3.8.37 ≥ 3.9, < 3.9.35 ≥ 4.0, < 4.0.34 ≥ 4.1, < 4.1.34 ≥ 4.2, < 4.2.31
+16 more≥ 4.3, < 4.3.27 ≥ 4.4, < 4.4.26 ≥ 4.5, < 4.5.25 ≥ 4.6, < 4.6.22 ≥ 4.7, < 4.7.22 ≥ 4.8, < 4.8.18 ≥ 4.9, < 4.9.19 ≥ 5.0, < 5.0.15 ≥ 5.1, < 5.1.12 ≥ 5.2, < 5.2.14 ≥ 5.3, < 5.3.11 ≥ 5.4, < 5.4.9 ≥ 5.5, < 5.5.8 ≥ 5.6, < 5.6.7 ≥ 5.7, < 5.7.5 ≥ 5.8, < 5.8.3

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitReported · reference

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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2022-21661
BreachSpider IDBS-2022-GLOBAL-304925-H
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published2022-01-06
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-89: SQL Injection

Attacker inserts SQL commands into application queries through user-controlled input, allowing unauthorized database access.

Related attack patterns (CAPEC)

CAPEC-7 Blind SQL Injection via CWE-89

CAPEC-108 Command Line Execution through SQL Injection via CWE-89

CAPEC-109 Object Relational Mapping Injection via CWE-89

CAPEC-110 SQL Injection through SOAP Parameter Tampering via CWE-89

CAPEC-470 Expanding Control over the Operating System from the Database via CWE-89

Show all 6

CAPEC-66 SQL Injection via CWE-89

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2022-21661 is a SQL injection vulnerability in WordPress due to improper sanitization in WP_Query. This vulnerability affects versions prior to 5.8.3 and has a CVSS score of 7.5. The vulnerability is exploitable via network and does not require user interaction or privileges. A public proof of concept and exploit are available, increasing the risk of exploitation. Immediate action is recommended to mitigate the risk, especially in environments where WordPress is used for critical applications or integrated with OT systems.

The vulnerability arises from improper sanitization in the WP_Query function, which can lead to SQL injection if plugins or themes use it in a certain way. An attacker can exploit this vulnerability remotely without authentication, potentially leading to unauthorized data access or manipulation. The CVSS vector indicates that the attack can be performed over the network with low complexity, and the impact is primarily on confidentiality.

Compensating controls AI-drafted, review before use

Implement strict input validation and sanitization for all user inputs in WordPress plugins and themes. Use parameterized queries or prepared statements to prevent SQL injection. Regularly update WordPress to the latest version and enable auto-updates.

NERC CIP: CIP-007 CIP-007-R2

IEC 62443: SR 7.6

Not validated for your network. A compensating control does not replace the vendor fix.

Questions

What is CVE-2022-21661?

CVE-2022-21661 is a SQL injection vulnerability in WordPress due to improper sanitization in WP_Query. This vulnerability affects versions prior to 5.8.3 and has a CVSS score of 7.5. The vulnerability is exploitable via network and does not require user interaction or privileges. A public proof of concept and exploit are available, increasing the risk of exploitation. Immediate action is recommended to mitigate the risk, especially in environments where WordPress is used for critical application

What is the CVSS score for CVE-2022-21661?

CVE-2022-21661 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. EPSS: 97.8%.

Is CVE-2022-21661 actively exploited?

Public exploit available for CVE-2022-21661. Exploitation risk elevated.

How do I remediate CVE-2022-21661?

Priority: IMMEDIATE. Advisory: https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/ PSIRT: [email protected]

What systems are affected by CVE-2022-21661?

CVE-2022-21661 affects Debian Debian Linux; Fedoraproject Fedora; Wordpress Wordpress.

What NERC-CIP standard applies to CVE-2022-21661?

NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 because it involves a vulnerability in a critical cyber asset (WordPress) that could allow unauthorized access to or manipulation of data, potentially impacting the reliability and security of the BES.

What IEC 62443 requirement maps to CVE-2022-21661?

IEC 62443 SR 7.6: This CVE maps to SR 7.6 because it involves a vulnerability in a web application (WordPress) that could be exploited to gain unauthorized access to the system, which is a critical security requirement for protecting against unauthorized access and data manipulation.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Debian","product":"Debian Linux","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.