CVE-2022-50972
Received Received - Intake
Remote Code Execution in WooCommerce via Product-Type Parameter

Publication date: 2026-06-20

Last updated on: 2026-06-20

Assigner: VulnCheck

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-20
Last Modified
2026-06-20
Generated
2026-06-20
AI Q&A
2026-06-20
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
woocommerce woocommerce 7.1.0
woocommerce woocommerce to 7.1.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2022-50972 is a critical remote code execution vulnerability in WooCommerce version 7.1.0 and earlier. It arises from improper input sanitization in the product-type parameter within the file class-wc-meta-box-product-images.php. Attackers can exploit this flaw by injecting shell commands through this parameter, which allows them to write malicious PHP files to the web root and execute arbitrary PHP code on the server.

Impact Analysis

This vulnerability can have severe impacts including unauthorized remote code execution on your server. An attacker exploiting this flaw can execute arbitrary PHP code, potentially leading to full server compromise, data theft, defacement, or further attacks on your infrastructure. Since the malicious code can be written to the web root, it can be accessed and triggered remotely without authentication.

Detection Guidance

This vulnerability can be detected by checking for the presence of malicious PHP files written to the web root, such as files named "info.php" or other unexpected PHP files that may have been created by an attacker exploiting the product-type parameter.

Network detection can involve monitoring HTTP requests to the WooCommerce plugin endpoint class-wc-meta-box-product-images.php for suspicious or crafted requests containing unusual or shell command-like values in the product-type parameter.

On the server, you can search for recently created or modified PHP files in the web root directory. For example, using the command:

  • find /path/to/webroot -name '*.php' -mtime -7

This command lists PHP files modified or created in the last 7 days, which may help identify malicious files created by the exploit.

Additionally, you can inspect web server logs for suspicious POST or GET requests to the vulnerable endpoint with unusual product-type parameter values.

Mitigation Strategies

The immediate and most effective mitigation step is to update the WooCommerce plugin to the latest version where this vulnerability has been patched.

If updating immediately is not possible, restrict access to the vulnerable endpoint class-wc-meta-box-product-images.php by limiting HTTP methods or IP addresses that can access it.

Additionally, review and remove any suspicious PHP files that may have been created in the web root as a result of exploitation.

Ensure that proper input validation and sanitization mechanisms are in place for parameters like product-type to prevent injection of shell commands.

Compliance Impact

The vulnerability allows remote code execution by injecting malicious PHP code, which can lead to unauthorized access and manipulation of data on the affected WooCommerce installation.

Such unauthorized access and potential data manipulation can compromise the confidentiality, integrity, and availability of sensitive data, which are core requirements in standards and regulations like GDPR and HIPAA.

Failure to patch this vulnerability could result in non-compliance with these regulations due to inadequate protection of personal and sensitive data, potentially leading to data breaches and legal consequences.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2022-50972. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart