Wing FTP Server Admin Session Poisoning via Lua loadfile() RCE (CVE-2026-44403)
by ZemarKhos · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-44403
- Category
- web
- Affected product
- Wing FTP Server (WebAdmin console)
- Affected versions
- v8.1.2 confirmed vulnerable (issue traces back through the line since the incomplete CVE-2025-47812 fix in v7.4.4)
- Disclosed
- 2026-07-05
- Patch status
- patched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | ZemarKhos |
| CVE / Advisory | CVE-2026-44403 |
| Category | web |
| Severity | High |
| CVSS Score | N/A (see advisory) |
| Status | PoC |
| Tags | wingftp, lua, session-poisoning, loadfile, rce, webadmin, authenticated |
| Related | CVE-2025-47812 (earlier, incompletely-fixed Wing FTP session-injection RCE) |
Affected Target
| Field | Value |
|---|---|
| Software / System | Wing FTP Server (WebAdmin console) |
| Versions Affected | v8.1.2 confirmed vulnerable (issue traces back through the line since the incomplete CVE-2025-47812 fix in v7.4.4) |
| Language / Platform | Lua (server-side WebAdmin scripts), HTTP admin interface |
| Authentication Required | Yes — requires valid full-administrator credentials (not readonly, not domain admin) |
| Network Access Required | Yes — HTTP(S) access to the WebAdmin interface (default port 5466) |
Summary
Wing FTP Server’s WebAdmin session mechanism serializes session values as executable Lua source using [[...]] long-string literals. Because bracket-sanitization code that would strip [/] characters from session values was commented out, a value containing ]] prematurely closes the long string and lets an attacker inject arbitrary Lua that executes the next time the session file is loaded via loadfile(). An authenticated full administrator can set a malicious mydirectory (basefolder) value on a domain admin account; when that account’s session is created and subsequently reloaded, the injected Lua runs with the privileges of the Wing FTP Server process (SYSTEM on Windows, root on Linux). This is a distinct, still-exploitable variant of the vulnerability class only partially fixed by CVE-2025-47812.
Vulnerability Details
Root Cause
serialize() in SessionModule.lua:103 and SessionModuleAdmin.lua:104 writes session values as:
| |
If v contains ]], the Lua long-string literal closes early and everything after it is parsed and executed as Lua source when the session file is later loaded via loadfile() + f() (SessionModule.lua:184-188). The bracket-stripping sanitization that should prevent this exists in cgi.lua:274-275 / cgiadmin.lua:277-278 but is commented out, and the session metatable that would otherwise enforce it (cgi.lua:282, cgiadmin.lua:285) is likewise disabled. The v7.4.4 fix for CVE-2025-47812 only addressed a null-byte injection vector in the username field — it never re-enabled bracket sanitization or fixed the underlying unsafe serialization, leaving the mydirectory (basefolder) field on domain-admin accounts exploitable in v8.1.2.
Attack Vector
- An authenticated full administrator (not readonly, not domain admin) creates or modifies a domain admin account via
service_add_admin.htmlorservice_modify_admin.html, settingmydirectoryto a value such asC:\ftproot]]os.execute("whoami > C:\\proof.txt")--. Neither endpoint sanitizes brackets frommydirectory(only the username field is bracket-stripped). - The poisoned domain admin logs in via
service_login.html, which stores the basefolder directly into the session (rawset(_SESSION,"admin_basefolder",basefolder)andadmin_nowpath), andSessionModuleAdmin.save()serializes it as_SESSION['admin_basefolder']=[[C:\ftproot]]os.execute("whoami > C:\\proof.txt")--]]. - On the next request that loads this session (e.g. navigating to any admin page or hitting
service_get_dir_list.html),loadfile()parses the session file as Lua: the[[C:\ftproot]]closes as a string,os.execute(...)executes as code, and the trailing--]]is commented out. - The injected command runs with the privileges of the Wing FTP Server service process.
Impact
Remote code execution as the Wing FTP Server service account (typically SYSTEM on Windows or root on Linux), achievable by any full administrator account — including one that was itself compromised via a lower-privilege vector, or a malicious insider with admin access. The payload persists and re-executes on every subsequent load of the poisoned session file.
Environment / Lab Setup
Target: Wing FTP Server v8.1.2, WebAdmin interface (default port 5466).
Prerequisite: valid full-administrator credentials on the target.
No bundled lab/container; run against a Wing FTP Server instance you control:
python3 session_poisoning_poc.py demo
python3 session_poisoning_poc.py exploit <host:port> <admin_user> <admin_pass>
Proof of Concept
PoC Script
See
session_poisoning_poc.pyin this folder.
| |
The exploit mode logs in as the given full administrator, creates (or modifies) a domain admin account named svc_backup with a poisoned mydirectory value, then logs in as that poisoned account and issues a follow-up request to trigger loadfile() on the session file. On a vulnerable target this writes a proof file (e.g. C:\wingftp_pwned.txt) containing the output of whoami, confirming server-side Lua code execution.
Detection & Indicators of Compromise
- Domain admin accounts with a "mydirectory"/basefolder value containing "]]" or other
Lua metacharacters/function calls (e.g. os.execute, io.popen).
- Unexpected admin/domain-admin creation or modification events via
service_add_admin.html / service_modify_admin.html shortly followed by a login as
that account.
- Unusual child processes spawned by the Wing FTP Server service process
(wftpserver.exe / wftpserverd) immediately after an admin session load.
Signs of compromise:
- Unexplained files created by the Wing FTP Server process (e.g. proof-of-execution files, dropped payloads).
- New or modified domain admin accounts with suspicious basefolder/directory values.
- Wing FTP Server process spawning shells or command interpreters.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Apply vendor patch that re-enables bracket sanitization for all session-bound fields (including mydirectory/basefolder) and restores the session metatable enforcement in cgi.lua/cgiadmin.lua, or upgrade to a fixed Wing FTP Server release once available. |
| Interim mitigation | Restrict WebAdmin access to trusted admin networks only; audit and limit who holds full-administrator privileges; monitor/alert on domain admin account creation or modification containing bracket characters in the basefolder field. |
References
Notes
Mirrored from https://github.com/ZemarKhos/CVE-2026-44403-WingFTP-v8.1.2-POC-Exploit on 2026-07-05.
| |