CVE-2022-21664 HIGH

CVE-2022-21664: SQL injection in WordPress

Vendor Wordpress
Product wordpress-develop
Weakness CWE-89 · SQLi
Published January 6, 2022
Last update April 23, 2025

CVSS base score

7.4/10
Attack vector Network
Attack complexity Low
Privileges required Low
User interaction None
Confidentiality Low
Integrity Low

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

What the vulnerability does

01Description

WordPress is a free and open-source content management system written in PHP and paired with a MariaDB database. Due to lack of proper sanitization in one of the classes, there's potential for unintended SQL queries to be executed. This has been patched in WordPress version 5.8.3. Older affected versions are also fixed via security release, that go back till 4.1.34. We strongly recommend that you keep auto-updates enabled. There are no known workarounds for this issue.

Explanation of Vulnerability in Simple Terms

02Summary

A SQL injection vulnerability in WordPress allows authenticated users with low privileges to execute arbitrary SQL queries on the site database. The vulnerability affects versions 4.1.33 through 5.8.2. An attacker with a low-privilege account can read, modify, or delete database records, potentially exposing sensitive data or compromising site functionality. The scope is changed, meaning the impact extends beyond the vulnerable component.

What an attacker can do

03Attacker Capabilities

Execute SQL queries to read, modify, or delete database records with the privileges of the WordPress database user.

Potential impact on your site

04Site Impact

Database contents may be exposed, modified, or deleted; site functionality could be compromised depending on what data is targeted.

Conditions required to exploit

05Prerequisites

Attacker must have a low-privilege WordPress user account (e.g., subscriber or contributor role).

Key dates

06Disclosure timeline

January 6, 2022 CVE published
April 23, 2025 Record updated

Related vulnerabilities

08Related CVE