What’s Vulnerable › Vulnerabilities
CVE-2021-32789: Arbitrary SQL (SQL injection) possible via the Store API component.
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 17.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-07-26 · updated 2026-06-17
- Weakness: CWE-89
Description
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.
Affected products
- Automattic WooCommerce Blocks: from 2.5.0 before 2.5.16; from 2.6.0 before 2.6.2; from 2.7.0 before 2.7.2; from 2.8.0 before 2.8.1; from 2.9.0 before 2.9.1; from 3.0.0 before 3.0.1 — fixed in 2.5.16, 2.6.2, 2.7.2, 2.8.1, 2.9.1, 3.0.1
How to fix
Upgrade to a fixed version: Automattic WooCommerce Blocks 2.5.16, 2.6.2, 2.7.2, 2.8.1. Check the vendor advisory for mitigations.
References
- https://github.com/woocommerce/woocommerce-gutenberg-products-block-ghsa-6hq4-w6wv-8wrp/pull/1
- https://github.com/woocommerce/woocommerce-gutenberg-products-block/security/advisories/GHSA-6hq4-w6wv-8wrp
- https://hackerone.com/reports/1260787
- https://woocommerce.com/posts/critical-vulnerability-detected-july-2021/
- https://wooengineering.wordpress.com/2021/07/14/incident-report-sql-injection-via-store-api/
- https://github.com/woocommerce/woocommerce-gutenberg-products-block-ghsa-6hq4-w6wv-8wrp/pull/1
- https://github.com/woocommerce/woocommerce-gutenberg-products-block/security/advisories/GHSA-6hq4-w6wv-8wrp
- https://hackerone.com/reports/1260787
- https://woocommerce.com/posts/critical-vulnerability-detected-july-2021/
- https://wooengineering.wordpress.com/2021/07/14/incident-report-sql-injection-via-store-api/
Get alerted when CVE-2021-32789 or the next vulnerability affects your stack