FTP Command Injection Vulnerability in basic-ftp by Patrick Juchli
CVE-2026-39983

8.6HIGH

Key Information:

Status
Vendor
CVE Published:
9 April 2026

What is CVE-2026-39983?

The basic-ftp library, an FTP client for Node.js, is susceptible to an FTP command injection vulnerability. This flaw arises from unvalidated input in file path parameters that are sent to various high-level path APIs, such as cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), and removeDir(). Attackers can exploit this by injecting CRLF sequences into file paths, thereby manipulating the command structure. The helper function protectWhitespace() only mitigates leading spaces, leaving other path manipulations unguarded. Consequently, FtpContext.send() directly writes these tampered command strings to the control socket, allowing attackers to divide a single FTP command into multiple unintended commands. This vulnerability was addressed in version 5.2.1.

Affected Version(s)

basic-ftp < 5.2.1

References

CVSS V3.1

Score:
8.6
Severity:
HIGH
Confidentiality:
Low
Integrity:
High
Availability:
Low
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.