CVE-2022-50972 WooCommerce 7.1.0 Remote Code Execution via class-wc-meta-box-product-images.php
Attackers can execute arbitrary PHP code by injecting shell commands via the product-type parameter in WooCommerce.
- 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-2022-50972?
CVE-2022-50972 is a critical code injection vulnerability in WooCommerce, published on 20 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
WooCommerce 7.1.0 contains a remote code execution vulnerability that allows attackers to execute arbitrary PHP code by injecting shell commands through the product-type parameter. Attackers can send requests to the class-wc-meta-box-product-images.php endpoint with unsanitized product-type values to write malicious PHP files to the web root.
Weakness: CWE-94
Which versions are affected by CVE-2022-50972?
How do I fix CVE-2022-50972?
No fix has been published for CVE-2022-50972 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2022-50972 being exploited?
There is no known exploitation of CVE-2022-50972 in the wild and no public exploit code.
Sources
Also known as GHSA-c7rq-gwp2-958v.