WooCommerce Blocks < 5.5 - Authenticated Blind SQL Injection
Strategic Overview
- Status
- Patched in 2.5.16
- Affected Plugin
- WooCommerce Blocks
- Affected Version
2.5.15 – 5.5 · 31 branches- CVSS
- 8.8High
- Weakness type
- CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
- CVE
CVE-2021-32789
At a glance
CVE-2021-32789 is a high-severity Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in the WooCommerce Blocks WordPress plugin, affecting versions 2.5.15 – 5.5 · 31 branches. It carries a CVSS score of 8.8 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires an authenticated account. The issue is fixed in version 2.5.16; sites on affected versions should update now. Disclosed July 2021, reported by Josh (jl-dos).
Vulnerability Overview
woocommerce-gutenberg-products-block is a feature plugin for WooCommerce Gutenberg Blocks. An SQL injection vulnerability impacts all WooCommerce sites running the WooCommerce Blocks feature plugin between version 2.5.0 and prior to version 2.5.16. Via a carefully crafted URL, an exploit can be executed against the `wc/store/products/collection-data?calculate_attribute_counts[][taxonomy]` endpoint that allows the execution of a read only sql query. There are patches for many versions of this package, starting with version 2.5.16. There are no known workarounds aside from upgrading.
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.
CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Reaching this weakness in WooCommerce Blocks 2.5.15 – 5.5 · 31 branches takes any authenticated account. SQL injection happens when request data is concatenated into a query instead of being bound as a parameter, letting an attacker change the structure of the statement rather than just its values.
A working injection can read any table the database user can see, which on a WordPress install means user records, password hashes and session or API secrets stored in options. For WooCommerce Blocks the fix is 2.5.16: builds 2.5.15 – 5.5 · 31 branches are affected, anything from 2.5.16 onward is not.
Remediation
Update to one of the following versions, or a newer patched version: 2.5.16, 2.6.2, 2.7.2, 2.8.1, 2.9.1, 3.0.1, 3.1.1, 3.2.1, 3.3.1, 3.4.1, 3.5.1, 3.6.1, 3.7.2, 3.8.1, 3.9.1, 4.0.1, 4.1.1, 4.2.1, 4.3.1, 4.4.3, 4.5.3, 4.6.1, 4.7.1, 4.8.1, 4.9.2, 5.0.1, 5.1.1, 5.2.1, 5.3.2, 5.4.1, 5.5.1
How does WordSec protect against this?
The attempt arrives as an ordinary request to WooCommerce Blocks: WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: WooCommerce Blocks 2.5.16 closes this, and updating the plugin is the step that ends it.
- Firewall
- Alerts
External References
Related records
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C