CVE-2023-6120 in Welcart e-Commerce Plugininfo

Summary

by MITRE • 12/09/2023

The Welcart e-Commerce plugin for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 2.9.6 via the upload_certificate_file function. This makes it possible for administrators to upload .pem or .crt files to arbitrary locations on the server.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 04/11/2026

The Welcart e-commerce plugin for WordPress presents a critical directory traversal vulnerability identified as CVE-2023-6120 affecting all versions up to and including 2.9.6. This vulnerability resides within the upload_certificate_file function which fails to properly validate file paths during certificate upload operations. The flaw allows authenticated administrators to bypass normal file upload restrictions and write certificate files to arbitrary locations on the web server filesystem. This represents a significant security risk as it enables attackers who have gained administrative access to potentially escalate their privileges and compromise the entire WordPress installation. The vulnerability directly maps to CWE-22, which describes improper limitation of a pathname to a restricted directory, commonly known as path traversal or directory traversal attacks. Such vulnerabilities are particularly dangerous in web applications where file upload functionality is present, as they can lead to arbitrary code execution, data exfiltration, or complete system compromise.

The technical implementation of this vulnerability stems from insufficient input validation within the upload_certificate_file function. When administrators upload certificate files with .pem or .crt extensions, the plugin does not properly sanitize the destination path before writing files to disk. This allows maliciously crafted file paths to include directory traversal sequences such as ../ or ..\ that would normally be blocked by proper path validation. Attackers can exploit this weakness to place certificate files in sensitive directories such as the WordPress root directory, wp-content/uploads folder, or even in locations where the web server can execute code. The vulnerability is particularly concerning because it leverages legitimate administrative functionality while enabling unauthorized file placement, making detection more difficult. From an operational perspective, this vulnerability falls under ATT&CK technique T1059.001 for command and scripting interpreter and T1566.001 for credential access through valid accounts, as it requires administrative privileges but enables further exploitation once those privileges are obtained.

The impact of CVE-2023-6120 extends beyond simple file placement as it creates opportunities for more sophisticated attacks within the compromised environment. Once an attacker successfully places files in arbitrary locations, they can potentially overwrite existing system files, inject malicious code into the certificate handling process, or create backdoors for persistent access. The vulnerability affects not only the immediate WordPress installation but also the underlying server infrastructure, as certificate files are often used for SSL/TLS encryption and authentication purposes. Organizations running affected versions of the Welcart plugin face increased risk of data breaches, service disruption, and potential compliance violations. The vulnerability's exploitation requires an authenticated administrative account, which means that proper access control and privilege management become critical defensive measures. Security teams should consider this vulnerability as part of a broader attack surface assessment, particularly in environments where multiple administrators have access to WordPress installations. The flaw demonstrates the importance of proper input validation and secure file handling practices in web applications, especially when dealing with user-supplied data in privileged contexts.

Organizations should immediately upgrade to the latest version of the Welcart plugin to address this vulnerability, as no official patches were available for versions prior to the fix. System administrators should implement additional monitoring for unusual file upload activities and certificate-related operations within WordPress installations. The vulnerability highlights the need for comprehensive security testing of third-party plugins, particularly those handling sensitive data such as SSL certificates. Organizations should also consider implementing web application firewalls and file integrity monitoring solutions to detect and prevent exploitation attempts. Security controls should include regular vulnerability assessments of WordPress plugins and themes, along with privileged account monitoring to detect unauthorized administrative activities. The incident underscores the importance of maintaining up-to-date software components and following secure coding practices that prevent directory traversal attacks through proper input validation and path sanitization techniques.

Responsible

Wordfence

Reservation

11/14/2023

Disclosure

12/09/2023

Moderation

accepted

EPSS

0.00458

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!