Skip to content
OpenAdvisories
High · 8.0 Scanner template Public exploit CVE-2022-21661 EUVD-2022-26878

SQL injection in WordPress

Published Jan 6, 2022 · Updated Sep 9, 2024 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
WordPress wordpress-develop < 5.8.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 wordpress 5.8.3+dfsg1-1 —
Debian 13 wordpress 5.8.3+dfsg1-1 —
Debian 12 wordpress 5.8.3+dfsg1-1 —
Debian 11 wordpress 5.7.5+dfsg1-0+deb11u1 DSA-5039-1
Debian 10 wordpress 5.0.15+dfsg1-0+deb10u1 DSA-5039-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 9 wordpress 4.7.22+dfsg-0+deb9u1 DLA-2884-1
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS wordpress No fix yet —
Ubuntu 18.04 LTS wordpress No fix yet —
Ubuntu 16.04 LTS wordpress No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 13 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Advisories 2

References