Webkul Medical Prescription Attachment for WooCommerce — Unrestricted File Upload to Web Shell (CVE-2025-29009)
by Nxploited · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-29009
- Category
- web
- Affected product
- Webkul "Medical Prescription Attachment Plugin for WooCommerce" (WordPress plugin)
- Affected versions
- <= 1.2.3 (fixed in 1.2.4, per repository README)
- Disclosed
- 2026-07-06
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | Nxploited |
| CVE / Advisory | CVE-2025-29009 |
| Category | web |
| Severity | Critical |
| CVSS Score | 10.0 (per NVD) |
| Status | Weaponized |
| Tags | wordpress, woocommerce, medical-prescription-attachment, unrestricted-file-upload, webshell, cwe-434, unauthenticated, python |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Webkul “Medical Prescription Attachment Plugin for WooCommerce” (WordPress plugin) |
| Versions Affected | <= 1.2.3 (fixed in 1.2.4, per repository README) |
| Language / Platform | Python 3.8+ exploit script targeting PHP/WordPress + WooCommerce sites |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
The Webkul Medical Prescription Attachment plugin for WooCommerce exposes an AJAX action, wkwcpa_handle_prescription_session, that lets storefront visitors upload a “prescription” file attachment without validating the uploaded file’s extension or MIME type on the server side. Because the endpoint is reachable pre-authentication (it only requires a WordPress nonce that is itself embedded in the public storefront’s page source), any unauthenticated visitor can upload a PHP web shell disguised as a prescription attachment and have it stored in a web-accessible uploads directory. The PoC script scrapes the nonce from the public shop/product pages, uploads a signed PHP shell via the vulnerable AJAX handler, parses the returned attachment URL from the JSON response, and verifies remote code execution by requesting the shell and checking for a unique signature string. Successful exploitation gives the attacker arbitrary PHP execution on the WordPress host, i.e. full compromise of the site and, depending on hosting configuration, the underlying server.
Vulnerability Details
Root Cause
The plugin’s front-end AJAX handler for the wkwcpa_handle_prescription_session action accepts a file array (wkwc_pa_prescription_attachment[]) and stores it without checking that the uploaded file is an actual image/document type (no extension allow-list, no MIME sniffing, no re-encoding). The only “protection” is a WordPress nonce (ajaxNonce), but that nonce is generated for anonymous/unauthenticated visitors and shipped directly in the storefront’s inline JavaScript object wkwcpaFrontObj:
| |
Because the nonce is public and the upload handler performs no file-type validation, an attacker can submit a .php file as the “attachment” and the server will happily save it under the WordPress uploads directory and return its public URL, resulting in classic CWE-434 (Unrestricted Upload of File with Dangerous Type) leading to remote code execution.
Attack Vector
- Request the site’s front page,
/shop/,/product/, or/?wkwcpa=1until one returns HTTP 200/301/302 containing the plugin’s inline script. - Parse the
wkwcpaFrontObjJavaScript object out of the HTML to recoverajaxUrl(normallywp-admin/admin-ajax.php) andajaxNonce. - POST to
ajaxUrlwithaction=wkwcpa_handle_prescription_session,type=upload,nonce=<ajaxNonce>, and a multipart file fieldwkwc_pa_prescription_attachment[]containing a PHP web shell (e.g.shell.phpwith an embedded signature string). - Parse the JSON response’s
data.attachments_img_htmlarray for thesrcattribute pointing at the newly uploaded file’s public URL. - Request the returned shell URL and confirm the unique signature string appears in the response, proving the PHP file was stored and executed unmodified.
- Record verified shell URLs to
shells.txtfor later interactive use (e.g.?cmd=command execution).
Impact
An unauthenticated attacker gains arbitrary PHP code execution on the WordPress web server by planting a persistent web shell, leading to full site takeover, database access, defacement, lateral movement into the hosting environment, and potential further compromise of any co-hosted applications.
Environment / Lab Setup
- WordPress installation with WooCommerce active
- "Medical Prescription Attachment Plugin for WooCommerce" (Webkul) version <= 1.2.3 installed and active
- At least one product page (or the front page) rendering the wkwcpaFrontObj inline script
- Attacker host: Python 3.8+, pip install -r requirements.txt (requests, urllib3, rich)
- A prepared PHP web shell file (e.g. shell.php) containing a unique signature string for verification
Proof of Concept
PoC Script
See
CVE-2025-29009.pyin this folder.
| |
Detection & Indicators of Compromise
- POST requests to /wp-admin/admin-ajax.php with action=wkwcpa_handle_prescription_session
and a multipart field named wkwc_pa_prescription_attachment[] carrying a .php (or other
executable) file instead of an image/PDF prescription document
- New files with executable extensions (.php, .phtml, .php5, etc.) appearing under
wp-content/uploads/ that were not uploaded through normal admin/media workflows
- Outbound GET requests to uploaded files under wp-content/uploads/ with query strings
such as ?cmd= shortly after the upload POST (shell verification / interactive use)
- Repeated automated requests to /, /shop/, /product/, /?wkwcpa=1 from a single source in
rapid succession (front-page/nonce scraping behavior)
Signs of compromise:
- Unexpected
.phpfiles insidewp-content/uploads/<year>/<month>/ - Presence of unfamiliar signature strings or webshell code (e.g.
system($_GET[...])) in uploaded files - Entries in
shells.txt-style attacker tooling output pointing at your domain - Unexplained outbound connections or command execution originating from the web server process (php-fpm/apache/nginx worker)
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade “Medical Prescription Attachment Plugin for WooCommerce” to version 1.2.4 or later, which addresses the unrestricted file upload. |
| Interim mitigation | Disable or remove the plugin until patched; block/deny execution of PHP files inside wp-content/uploads/ via web server config (e.g. Apache .htaccess or Nginx location block); add a WAF rule blocking non-image/PDF uploads to admin-ajax.php with action=wkwcpa_handle_prescription_session; audit uploads directory for existing planted shells. |
References
Notes
Mirrored from https://github.com/Nxploited/CVE-2025-29009 on 2026-07-06. The repository’s README uses Nxploited’s standard stylized branding/banner, but the exploit logic (nonce scraping from wkwcpaFrontObj, upload via wkwcpa_handle_prescription_session, response parsing, and shell verification) is specific to this CVE and is a fully functional, working exploit chain.
| |