Skip to content
RCE Write-up Intermediate

CVE-2025–47812: Critical Wing FTP Server Remote Code Execution Vulnerability Under Active Exploitation

Wing FTP Server mishandled null bytes in the username during authentication, allowing an attacker to bypass login and inject Lua code into session files. This let an attacker execute arbitrary commands with root or SYSTEM privileges.

Jean-Baptiste Lapeyre Follow

Published on blog.lapeyre.ovh

CVE-2025–47812 represents one of the most critical vulnerabilities discovered in 2025, affecting Wing FTP Server with a maximum CVSS score of 10.0. This remote code execution flaw has been actively exploited in the wild since July 1, 2025, just one day after its public disclosure.

Jean-Baptiste Lapeyre, on blog.lapeyre.ovh

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the authentication function used a string length check that stopped at a null byte, while the full username was stored unsanitised in a Lua session file that was later executed.

Impact

Attackers could execute arbitrary code with root or SYSTEM privileges, leading to complete system compromise, data theft, and further network attacks.

What the attacker needed

Network access to the Wing FTP web interface; Anonymous FTP access enabled (or valid credentials)

The fix

The vulnerability was fixed in Wing FTP Server version 7.4.4; upgrading to that version or later is required.

How it was found

  1. Send a POST request to the login endpoint with a username containing a null byte followed by Lua code.
  2. The server creates a session file that includes the injected Lua code.
  3. Make any subsequent authenticated request to load the session file and execute the code.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A null byte is a special character that some programs treat as the end of a text string. Wing FTP checked only the part of the username before the null byte, so it thought the login was valid, but it saved the whole username, including hidden code, into a file that later runs as a script. Because the server runs with high privileges, that hidden code could take full control of the machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.