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

High 7.5 Published Updated

Attackers can execute read-only SQL queries via a crafted URL in the WooCommerce Blocks plugin, exposing sensitive data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-32789?

CVE-2021-32789 is a high-severity SQL injection vulnerability in woocommerce-gutenberg-products-block, published on 26 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-89

Which versions are affected by CVE-2021-32789?

It affects 1 product.

Products include Automattic Woocommerce Blocks.

How do I fix CVE-2021-32789?

No fix has been published for CVE-2021-32789 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2021-32789 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-32789 exists.

Public exploit code: 1 Nuclei template and 2 proofs of concept on GitHub.

Sources

Also known as GHSA-6hq4-w6wv-8wrp.

Is CVE-2021-32789 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free