CVE-2022-21661

HIGH EXPLOITED NUCLEI LAB

WordPress 3.7-3.7.36 - SQL Injection via WP_Query

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2022-21661 has been observed exploited in the wild (reported by VulnCheck KEV). EIP tracks 14 public exploits from researchers including Aryan Chehreghani, z92g, purple-WL. A Nuclei detection template is also available.

AI-analyzed exploit summary This exploit demonstrates a SQL injection vulnerability in WordPress Core versions prior to 5.8.3 via the WP_Query class. The PoC provides a sample HTTP request that injects malicious input into the 'tax_query' parameter, allowing an attacker to disclose sensitive information from the database.

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.

Exploits (14)

exploitdb WORKING POC
by Aryan Chehreghani · textwebappsphp
https://www.exploit-db.com/exploits/50663

This exploit demonstrates a SQL injection vulnerability in WordPress Core versions prior to 5.8.3 via the WP_Query class. The PoC provides a sample HTTP request that injects malicious input into the 'tax_query' parameter, allowing an attacker to disclose sensitive information from the database.

Classification
Working Poc 90%
Attack Type
Sqli
Complexity
Trivial
Reliability
Reliable
Target: WordPress Core < 5.8.3
No auth needed
Prerequisites: Access to the target WordPress site · Network connectivity to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 28 stars
by z92g · infoleak
https://github.com/z92g/CVE-2022-21661

This repository contains a Go-based scanner for detecting CVE-2022-21661, a SQL injection vulnerability in WordPress versions 4.1 to 5.8.2. It checks for the vulnerability by sending crafted payloads to the target's admin-ajax.php endpoint and analyzing responses.

Classification
Scanner 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress v4.1~v5.8.2
No auth needed
Prerequisites: Target must be running a vulnerable version of WordPress · Target's admin-ajax.php endpoint must be accessible
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 17 stars
by purple-WL · infoleak
https://github.com/purple-WL/wordpress-CVE-2022-21661

This PoC demonstrates an out-of-band SQL injection vulnerability in WordPress versions prior to 5.8.3. The exploit leverages a crafted POST request to admin-ajax.php, using the tax_query parameter to trigger a DNS-based exfiltration of the database version via load_file.

Classification
Working Poc 90%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress < 5.8.3
Auth required
Prerequisites: Access to wp-admin/admin-ajax.php · Valid authentication credentials · DNS exfiltration service (e.g., ceye.io)
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 14 stars
by 0x4E0x650x6F · infoleak
https://github.com/0x4E0x650x6F/Wordpress-cve-CVE-2022-21661

This repository contains a proof-of-concept exploit for CVE-2022-21661, a vulnerability in the Ele Custom Skin WordPress plugin. The exploit involves a Docker setup to replicate the vulnerable environment and includes the plugin files necessary to demonstrate the vulnerability.

Classification
Working Poc 90%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: Ele Custom Skin WordPress plugin
No auth needed
Prerequisites: Docker environment · WordPress installation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 7 stars
by guestzz · poc
https://github.com/guestzz/CVE-2022-21661

This repository contains a Python-based exploit for CVE-2022-21661, targeting a SQL injection vulnerability in the Elementor Custom Skin plugin for WordPress. The exploit includes methods for information gathering, user credential extraction via time-based blind SQL injection, and DNS exfiltration.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: Elementor Custom Skin plugin for WordPress
No auth needed
Prerequisites: Target must have the vulnerable Elementor Custom Skin plugin installed · WordPress installation must be accessible
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 6 stars
by WellingtonEspindula · remote
https://github.com/WellingtonEspindula/SSI-CVE-2022-21661

This repository contains a functional exploit for CVE-2022-21661, a SQL injection vulnerability in WordPress versions below 5.8.3. The exploit uses time-based blind SQL injection to extract database names and user credentials, including password hashes.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress < 5.8.3
No auth needed
Prerequisites: Docker · Docker-Compose · Python 3.9+ · Argparser · Hashcat
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 6 stars
by sealldeveloper · remote
https://github.com/sealldeveloper/CVE-2022-21661-PoC

This is a Python-based PoC for CVE-2022-21661, a SQL injection vulnerability in WordPress. It tests for vulnerability by sending crafted requests to the admin-ajax.php endpoint and checks for responses indicating successful exploitation via MD5 hash extraction or time-based delays.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress (specific version not specified in PoC)
No auth needed
Prerequisites: Access to the target WordPress instance's admin-ajax.php endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by daniel616 · remote
https://github.com/daniel616/CVE-2022-21661-Demo

This repository demonstrates a SQL injection vulnerability in WordPress 5.8.2 via a malicious plugin that exploits unsanitized input in class-wp-tax-query.php. The PoC includes a Docker setup and a blind SQLi example using time delays.

Classification
Working Poc 90%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress 5.8.2
Auth required
Prerequisites: WordPress 5.8.2 installation · Ability to install a malicious plugin · Unsanitized user input passed to $terms variable
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec STUB
by 7rootsec · poc
https://github.com/7rootsec/CVE-2022-21661-Technical-Analysis

The repository contains only a README file with minimal content, lacking any technical analysis or exploit code for CVE-2022-21661. No functional exploit or detailed writeup is present.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: unknown
No auth needed
devstral-2 · analyzed Mar 02, 2026 Full analysis →
nomisec WORKING POC
by Fauzan-Aldi · infoleak
https://github.com/Fauzan-Aldi/CVE-2022-21661

This is a Python-based PoC for CVE-2022-21661, a WordPress vulnerability that allows unauthenticated object injection, potentially leading to RCE. The script checks for vulnerability by testing SQL injection via MD5 hash extraction and time-based queries.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress (specific version not specified)
No auth needed
Prerequisites: Target must be a WordPress instance with vulnerable admin-ajax.php endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by w0r1i0g1ht · infoleak
https://github.com/w0r1i0g1ht/CVE-2022-21661

This repository contains a proof-of-concept exploit for CVE-2022-21661, a SQL injection vulnerability in WordPress. The PoC includes a malicious HTTP request that leverages a crafted `tax_query` parameter to extract database information, such as the MySQL version.

Classification
Working Poc 90%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress (specific version not specified)
No auth needed
Prerequisites: Access to a vulnerable WordPress instance · Ability to send crafted HTTP requests to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by CharonDefalt · infoleak
https://github.com/CharonDefalt/WordPress--CVE-2022-21661

This repository contains a README file referencing CVE-2022-21661, a SQL Injection vulnerability in WordPress Core 5.8.2 via 'WP_Query'. It includes a link to an ExploitDB entry and a screenshot but no actual exploit code.

Classification
Writeup 90%
Attack Type
Sqli
Complexity
Moderate
Reliability
Theoretical
Target: WordPress Core 5.8.2
No auth needed
Prerequisites: Access to a vulnerable WordPress instance
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER
by p4ncontomat3 · remote-auth
https://github.com/p4ncontomat3/CVE-2022-21661

This repository contains a Python-based scanner for detecting CVE-2022-21661, a SQL injection vulnerability in WordPress. The scanner checks for the vulnerability by sending crafted payloads to the target and analyzing responses.

Classification
Scanner 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: WordPress (specific version not specified)
No auth needed
Prerequisites: Access to the target WordPress admin-ajax.php endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by safe3s · poc
https://github.com/safe3s/CVE-2022-21661

This repository contains a README describing CVE-2022-21661, an SQL injection vulnerability in WordPress Core 5.8.2 via 'WP_Query'. It references an ExploitDB entry and includes a link to a PoC video.

Classification
Writeup 80%
Attack Type
Sqli
Complexity
Moderate
Reliability
Theoretical
Target: WordPress Core 5.8.2
No auth needed
Prerequisites: Access to a vulnerable WordPress instance
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

WordPress <5.8.3 - SQL Injection
HIGHVERIFIEDby Marcio Mendes
Shodan: cpe:"cpe:2.3:a:wordpress:wordpress" || http.component:"wordpress"

References (11)

Core 11
Core References
Release Notes, Vendor Advisory x_refsource_misc
https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release/
Third Party Advisory, VDB Entry x_refsource_misc
https://www.zerodayinitiative.com/advisories/ZDI-22-020/
Third Party Advisory vendor-advisory x_refsource_debian
https://www.debian.org/security/2022/dsa-5039
Exploit, Third Party Advisory, VDB Entry x_refsource_misc
https://www.exploit-db.com/exploits/50663
Exploit, Third Party Advisory, VDB Entry x_refsource_misc
http://packetstormsecurity.com/files/165540/WordPress-Core-5.8.2-SQL-Injection.html
Mailing List, Third Party Advisory mailing-list x_refsource_mlist
https://lists.debian.org/debian-lts-announce/2022/01/msg00019.html

Scores

CVSS v3 8.0
EPSS 0.9779
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Lab Environment

COMMUNITY
Community Lab
docker pull wordpress:5.8.1
docker pull wordpress:cli
docker pull wordpress:5.8.2
+11 more repos

Details

VulnCheck KEV 2023-12-23
CWE
CWE-89
Status published
Products (6)
debian/debian_linux 9.0
debian/debian_linux 10.0
debian/debian_linux 11.0
fedoraproject/fedora 34
fedoraproject/fedora 35
wordpress/wordpress 3.7 - 3.7.37
Published Jan 06, 2022
Tracked Since Feb 18, 2026