WordPress WPAMS Plugin Arbitrary File Upload to RCE (CVE-2025-39401)
by Nxploited (Khaled Alenazi) · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-39401
- Category
- web
- Affected product
- WPAMS (WordPress Apartment/Property Management System) plugin by mojoomla
- Affected versions
- From n/a through 44.0 (17-08-2023)
- 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 | Nxploited (Khaled Alenazi) |
| CVE / Advisory | CVE-2025-39401 |
| Category | web |
| Severity | Critical |
| CVSS Score | 10.0 (per NVD) |
| Status | Weaponized |
| Tags | wordpress, wpams, mojoomla, arbitrary-file-upload, webshell, rce, unauthenticated, python, multithreaded, cwe-434 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WPAMS (WordPress Apartment/Property Management System) plugin by mojoomla |
| Versions Affected | From n/a through 44.0 (17-08-2023) |
| Language / Platform | Python 3.7+ (requests, rich), targets WordPress/PHP sites |
| Authentication Required | No — the exploit posts to the public member-registration form with no login |
| Network Access Required | Yes (HTTP/HTTPS to the target WordPress site) |
Summary
The WPAMS WordPress plugin (<= 44.0) contains an Unrestricted Upload of File with Dangerous Type vulnerability (CWE-434): its public “apartment management member registration” form accepts an avatar/upload field (amgt_user_avatar) without validating the file’s type or extension, allowing a .php web shell to be stored under wp-content/uploads/apartment_assets/. The root cause is that the plugin trusts the client-supplied filename/extension and does not enforce an image-only allow-list on this unauthenticated endpoint. Because the plugin renames the uploaded file using a predictable pattern ({unix_timestamp}-pimg-in.{ext}), the PoC uploads a PHP web shell and then brute-forces a small window of timestamps around the upload time to locate and confirm the shell is live, across many targets concurrently via threading. Successful exploitation gives an unauthenticated attacker a web shell and full remote code execution on the underlying WordPress server.
Vulnerability Details
Root Cause
The plugin’s member-registration upload handler saves the file submitted in the amgt_user_avatar form field into wp-content/uploads/apartment_assets/ without restricting it to image MIME types/extensions, and derives the stored filename from the current server timestamp rather than a random/unguessable token:
{UNIX_TIMESTAMP}-pimg-in.{ext}
Since {ext} is taken from the uploaded file’s own name, submitting shell.php yields a stored file such as 1764279528-pimg-in.php, which PHP will execute when requested directly. Because the naming is timestamp-based rather than random, an attacker who knows roughly when the upload occurred can brute-force the small number of candidate filenames to find the shell.
Attack Vector
- Attacker prepares a PHP web shell named
shell.phpcontaining a known marker string (e.g.<b>Nxploited</b>) so success can be detected in the response body. - Attacker
POSTs the shell to the vulnerable, unauthenticated endpoint:{target}/apartment-management-member-registration-page/, using theamgt_user_avatarmultipart field alongside dummy registration data (name, email, etc.). - The plugin stores the file under
wp-content/uploads/apartment_assets/{timestamp}-pimg-in.phpusing the server’s own upload timestamp. - The script records the client-side upload time and brute-forces a small window (±5 seconds, several retries) of candidate timestamps, requesting each candidate URL and checking the response for the shell’s marker string.
- Once a
200response containing the marker is found, the shell URL is confirmed live and logged; the shell can then be used to execute arbitrary PHP (and thus OS commands) on the server. - The script repeats this against a list of targets in parallel using multiple threads.
Impact
An unauthenticated remote attacker can upload and execute a PHP web shell on any WordPress site running the vulnerable WPAMS plugin version, resulting in full remote code execution, defacement, data theft, and use of the compromised server as a pivot point.
Environment / Lab Setup
Target: WordPress site with WPAMS plugin <= 44.0 (17-08-2023) installed and the apartment-management-member-registration-page active
Attacker: Python 3.7+, `pip install requests rich`, a PHP web shell saved as shell.php in the script's working directory
Proof of Concept
PoC Script
See
CVE-2025-39401.pyandrequirements.txtin this folder.
| |
Detection & Indicators of Compromise
Signs of compromise:
- Unexpected
.phpfiles underwp-content/uploads/apartment_assets/ - New WordPress “member” registrations with throwaway emails (e.g.
*@poc.com) around the time of the upload - Outbound requests or command execution originating from PHP processes under the uploads directory
- Entries in
success_results.txt/uploaded_shells.txt-style artifacts if the attacker’s tooling/logs are recovered
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update the WPAMS plugin to a version beyond 44.0 (17-08-2023) that restricts uploads to image types and randomizes stored filenames — verify against the vendor’s changelog/advisory |
| Interim mitigation | Disable or restrict access to the public member-registration page, add a web-server rule to deny PHP execution under wp-content/uploads/apartment_assets/, and audit that directory for unexpected .php files |
References
Notes
Mirrored from https://github.com/Nxploited/CVE-2025-39401 on 2026-07-06. Multithreaded exploit uploads shell.php via the WPAMS plugin’s member-registration form and brute-forces the timestamp-based filename; the tool follows Nxploited’s templated banner/CLI style, but the upload path, form field name, and filename-derivation logic are specific to this vulnerability and the exploit is functional as shipped.
| |