WooCommerce Dynamic Pricing & Discounts (WC Designer Pro) Unauthenticated File Upload RCE (CVE-2025-6440)
by sahmsec · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-6440
- Category
- web
- Affected product
- WordPress WooCommerce Dynamic Pricing & Discounts plugin (wc-designer-pro)
- Affected versions
- Not pinned by the PoC (dork-identified installs of the plugin)
- Disclosed
- 2026-07-06
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | sahmsec |
| CVE / Advisory | CVE-2025-6440 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Status | Weaponized |
| Tags | wordpress, woocommerce, wc-designer-pro, dynamic-pricing, file-upload, rce, unauthenticated, wp-ajax, cwe-434, nuclei |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WordPress WooCommerce Dynamic Pricing & Discounts plugin (wc-designer-pro) |
| Versions Affected | Not pinned by the PoC (dork-identified installs of the plugin) |
| Language / Platform | PHP / WordPress plugin (AJAX handler) |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
The WooCommerce Dynamic Pricing & Discounts plugin (installed under the wc-designer-pro plugin folder) exposes an unauthenticated AJAX action, wcdp_save_canvas_design_ajax, used by its product “canvas design” feature to save user-uploaded artwork. The handler accepts a files parameter describing the file’s name/extension and writes the uploaded content to a predictable, publicly accessible path under wp-content/uploads/wcdp-uploads/temp/<uniq>/ without validating or restricting the file extension. Because no authentication is required and the extension is attacker-controlled, an unauthenticated attacker can upload a .php file disguised with an image-like request and have it saved directly in the web root, achieving remote code execution once the file is requested.
Vulnerability Details
Root Cause
The wcdp_save_canvas_design_ajax AJAX action (reachable unauthenticated via wp-admin/admin-ajax.php) saves uploaded file content to a web-accessible uploads directory using attacker-supplied filename/extension metadata from the files array in the params JSON parameter, without server-side validation of the file type/extension. The resulting file is stored at a deterministic, attacker-known path (wp-content/uploads/wcdp-uploads/temp/{uniq}/{name}.{ext}, where uniq is echoed back by the server), so any extension — including .php — can be planted and later executed by the web server.
Attack Vector
- Send a multipart
POSTto/wp-admin/admin-ajax.phpwithaction=wcdp_save_canvas_design_ajaxand aparamsJSON blob describing a file entry (name,ext, plus canvas metadata such asmode,uniq,editor,designID,productID). - Attach the actual file content under the form field indexed by the
files[].countvalue, using an arbitrary extension (e.g.php) while labeling the MIME type innocuously (e.g.text/plainorimage/png). - The plugin saves the uploaded bytes verbatim to
wp-content/uploads/wcdp-uploads/temp/<uniq>/<name>.<ext>and reports"success": truealong with theuniqtoken. - The attacker requests the resulting public URL directly; if the extension was
.php, the web server executes the uploaded code, yielding remote code execution.
Impact
Unauthenticated arbitrary file upload to a web-accessible directory, resulting in remote code execution when a server-side scriptable extension (e.g. .php) is uploaded and subsequently requested.
Environment / Lab Setup
Target: WordPress site with the WooCommerce Dynamic Pricing & Discounts (wc-designer-pro) plugin active
Attacker: Python 3.x with `requests` installed (apt install python3-requests), or nuclei for the template-based check
Recon: Dork: "/wp-content/plugins/wc-designer-pro/"
Proof of Concept
PoC Script
See
CVE-2025-6440.pyandCVE-2025-6440.yamlin this folder.
| |
The Python script batch-processes a list of target URLs. For each target it POSTs a multipart request to wp-admin/admin-ajax.php with action=wcdp_save_canvas_design_ajax and a params payload describing an uploaded file named abc.php, attaching a benign marker payload (<?php echo "RCE TEST";?>) as the file content. On a JSON "success": true response it computes the predictable public URL (wp-content/uploads/wcdp-uploads/temp/<uniq>/abc.php) and issues a GET to confirm the file is publicly reachable (HTTP 200), logging confirmed targets to success and failures to failed.
The accompanying CVE-2025-6440.yaml is a Nuclei template that performs the same two-step check (upload a harmless pixel.png via the same AJAX action, then GET the resulting wp-content/uploads/wcdp-uploads/temp/{{uniq}}/pixel.png and confirm it is served back as image/png), useful for non-destructive detection at scale.
Detection & Indicators of Compromise
POST /wp-admin/admin-ajax.php HTTP/1.1
Content-Type: multipart/form-data; boundary=...
action=wcdp_save_canvas_design_ajax
params={"mode":"addtocart","uniq":"<token>","editor":"frontend", ... ,"files":[{"count":"0","name":"<name>","ext":"<ext>"}]}
Signs of compromise:
- Unauthenticated multipart POST requests to
/wp-admin/admin-ajax.phpwithaction=wcdp_save_canvas_design_ajax - Unexpected files (especially
.php,.phtml, or other scriptable extensions) underwp-content/uploads/wcdp-uploads/temp/ - Outbound requests to newly created files under that directory shortly after the upload request
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update the WooCommerce Dynamic Pricing & Discounts (wc-designer-pro) plugin to a patched version that validates/restricts uploaded file extensions and MIME types |
| Interim mitigation | Disable or restrict the wcdp_save_canvas_design_ajax AJAX action; block execution of scripts under wp-content/uploads/ (e.g. via web server configuration); monitor and purge unexpected files under wp-content/uploads/wcdp-uploads/temp/; deploy a WAF rule blocking non-image extensions in this endpoint’s upload payloads |
References
Notes
Mirrored from https://github.com/sahmsec/CVE-2025-6440 on 2026-07-06. Repository includes both a working Python batch-exploitation script and a Nuclei YAML template implementing the same two-step upload-then-verify logic against the wcdp_save_canvas_design_ajax endpoint.
| |