Security researchers have recently discovered a critical security vulnerability in the WS_FTP Server which can impact servers with versions prior to 8.7.4 and 8.8.2. This vulnerability, designated as CVE-2023-40044, can allow a pre-authenticated attacker to execute remote commands on the underlying server operating system through a .NET deserialization vulnerability in the Ad Hoc Transfer module. In this post, we will delve into the details of this remote code execution vulnerability, discuss its consequences, and provide the necessary references for additional information and patches.

Exploit Details

The CVE-2023-40044 vulnerability stems from insecure .NET deserialization in the WS_FTP Ad Hoc Transfer module. This module relies on the .NET framework to process incoming messages, which, in turn, uses the BinaryFormatter class to deserialize input data. Unfortunately, the improper handling of untrusted data during the deserialization process opens up a potential attack vector that can be exploited by a malicious attacker to execute remote commands on the affected WS_FTP Server.

Here's a snippet demonstrating the vulnerable code

using System;
using System.Runtime.Serialization.Formatters.Binary;
public class AdHocTransferService
    public object Deserialize(byte[] data)
        BinaryFormatter binaryFormatter = new BinaryFormatter();
        MemoryStream memoryStream = new MemoryStream(data);
        // The following line of code is vulnerable to deserialization attacks
        object deserializedObject = binaryFormatter.Deserialize(memoryStream);
        return deserializedObject;

This code is susceptible to attack because it allows any input data to be deserialized, which can include a malicious payload crafted by an attacker to induce code execution in the server environment.


The severity of this vulnerability is deemed critical because WS_FTP Server is a widely-used secure file transfer solution that many organizations rely on to transfer sensitive files safely. A successful exploitation of the CVE-2023-40044 vulnerability can have severe consequences, including:

Mitigation and Response

The vulnerability has been addressed in WS_FTP Server versions 8.7.4 and 8.8.2. Affected organizations should upgrade to these latest versions immediately to protect against potential exploitation by malicious actors.

Official advisories and references regarding this security issue can be found at the following locations:

1. Vendor Advisory: []()
2. CVE Details: []()
3. National Vulnerability Database (NVD) Entry: []()


The CVE-2023-40044 vulnerability, resulting from insecure .NET deserialization in the WS_FTP Server's Ad Hoc Transfer module, poses a significant risk to affected organizations. It is crucial to evaluate your infrastructure and apply the necessary patches as soon as possible to mitigate this critical security vulnerability. Keep up with the latest security advisories and practice due diligence in maintaining and updating your organization's infrastructure to defend against potential cyber threats effectively.


Published on: 09/27/2023 15:18:00 UTC
Last modified on: 10/02/2023 16:15:00 UTC