Monsta FTP Pre-Authentication Remote Code Execution via Arbitrary File Upload (CVE-2025-34299)
by KrE80r · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-34299
- Category
- network
- Affected product
- Monsta FTP (web-based FTP manager)
- Affected versions
- <= 2.11.2 (lab uses 2.10.4; patched in 2.11.3)
- Disclosed
- 2026-07-06
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | KrE80r |
| CVE / Advisory | CVE-2025-34299 |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (per NVD) |
| Status | Weaponized |
| Tags | monsta-ftp, rce, pre-auth, unrestricted-file-upload, cwe-434, php, ftp, docker, nuclei, kev |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Monsta FTP (web-based FTP manager) |
| Versions Affected | <= 2.11.2 (lab uses 2.10.4; patched in 2.11.3) |
| Language / Platform | PHP web application; lab built with Docker/Docker Compose (php:7.4-apache base image) |
| Authentication Required | No (pre-authentication) |
| Network Access Required | Yes |
Summary
Monsta FTP versions up to and including 2.11.2 contain a pre-authentication, unrestricted arbitrary file upload vulnerability (CWE-434) in the downloadFile action of its /mftp/application/api/api.php endpoint. The endpoint accepts a user-supplied FTP connection configuration and a remote/local path pair without requiring the caller to be authenticated and without adequately restricting where the “downloaded” file is written on the local filesystem. An attacker can point Monsta FTP at an FTP server they control, direct it to fetch a malicious file (e.g. a PHP webshell), and specify a localPath inside the web root, resulting in remote code execution with the privileges of the web server. This repository is a Docker-based lab (not a raw exploit script) that stands up a real, vulnerable Monsta FTP 2.10.4 instance for hands-on reproduction, plus a manual curl PoC that reaches the vulnerable code path and a reference to a nuclei detection template.
Vulnerability Details
Root Cause
The api.php endpoint dispatches actions based on an actionName parameter in a JSON-encoded request body, without first verifying that the caller is authenticated. One such action, downloadFile, accepts an FTP configuration block (host, port, credentials) plus a context object specifying remotePath (a path on the attacker-controlled FTP server) and localPath (where Monsta FTP should write the fetched file on the local web server filesystem). Because the endpoint is reachable pre-auth and does not adequately validate/sanitize the destination localPath or restrict the connection target, an attacker can:
- Stand up a malicious FTP server that serves a PHP webshell for any requested
remotePath. - Call
downloadFilewith that FTP server’s details and alocalPathinside the web-accessible document root. - Have Monsta FTP fetch the file over FTP and write it to that path, after which the attacker can request the dropped file via HTTP to execute it as PHP.
The lab’s manual verification request demonstrates reaching this exact code path:
| |
A response containing CONNECTION_FAILURE_ERROR (rather than an authentication error) confirms the vulnerable code path is reachable without any credentials — the endpoint attempted the FTP connection instead of rejecting the request as unauthenticated.
Attack Vector
- Attacker stands up a rogue FTP server that responds to file requests with a malicious PHP payload (e.g. a webshell).
- Attacker sends an unauthenticated
POSTto the target’s/mftp/application/api/api.phpwithactionName: downloadFile,connectionType: ftp, and aconfigurationblock pointing at the attacker’s FTP server. - The
context.remotePathspecifies the malicious file on the attacker’s FTP server;context.localPathspecifies a destination path within the target’s web-accessible document root (e.g. under/mftp/). - Monsta FTP’s backend connects to the attacker’s FTP server and downloads/writes the file to the specified local path — with no authentication required and insufficient path/type validation.
- Attacker requests the dropped file over HTTP, causing the web server to execute the uploaded PHP payload with the web server’s privileges.
Impact
Full pre-authentication remote code execution on the host running Monsta FTP, with the privileges of the web server process (e.g. www-data). This is a KEV-listed (per repo README) critical vulnerability requiring no credentials or user interaction.
Environment / Lab Setup
- Docker and Docker Compose
- Base image: php:7.4-apache
- Monsta FTP 2.10.4 (vulnerable version, fetched via Dockerfile from a web.archive.org
mirror of the official installer zip) unpacked to /var/www/html/mftp
- PHP ftp extension enabled (docker-php-ext-install ftp), mod_rewrite enabled
- Exposes the app on host port 8080 -> container port 80
- Optional: nuclei with the CVE-2025-34299.yaml template for automated detection
Proof of Concept
PoC Script
See
Dockerfileanddocker-compose.ymlin this folder (builds and runs a real vulnerable Monsta FTP 2.10.4 instance). No exploit script is included in the source repo — the repo provides a manualcurlverification command and a nuclei template reference; actual weaponized file-write/webshell-drop exploitation is left to the operator using the documenteddownloadFileaction.
| |
Detection & Indicators of Compromise
- Unauthenticated POST requests to /mftp/application/api/api.php with
actionName=downloadFile in the request body
- FTP connection attempts originating from the Monsta FTP host toward external/
unexpected FTP servers immediately following such requests
- New files (especially .php) appearing under the Monsta FTP web root shortly after
a downloadFile API call, particularly files not created via normal admin upload flows
- HTTP requests to newly created, unusual filenames under /mftp/ following the above
- Web server access logs showing execution of unfamiliar PHP files under the mftp
install path
Signs of compromise:
- Unknown PHP files (webshells) present in the Monsta FTP install directory
- Outbound FTP connections from the web server host to unfamiliar external IPs
- api.php requests with
actionName":"downloadFile"from unauthenticated/anonymous sessions in access logs - Unexpected www-data (or equivalent) process activity following HTTP requests to newly dropped files
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade Monsta FTP to version 2.11.3 or later, which patches the unrestricted file upload / pre-auth RCE (GHSA-42m5-3r2p-wr92) |
| Interim mitigation | Restrict network access to the Monsta FTP web interface (place behind authentication/VPN), disable or firewall the /mftp/application/api/api.php endpoint from untrusted networks, monitor for unauthenticated downloadFile API calls, and apply file integrity monitoring on the web root |
References
Notes
Mirrored from https://github.com/KrE80r/CVE-2025-34299-lab on 2026-07-06. This repo is a Dockerfile + docker-compose lab standing up a real vulnerable Monsta FTP 2.10.4 instance, with a manual curl PoC that confirms the pre-auth vulnerable code path and a reference to an external nuclei template (CVE-2025-34299.yaml, not bundled in this repo) for automated detection.