CVE-2026-39983 FTP Command Injection via CRLF in basic-ftp
Attacker can inject arbitrary FTP commands via CRLF sequences in file paths, potentially executing code or modifying data.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-39983?
CVE-2026-39983 is a high-severity command injection vulnerability in patrickjuchli basic-ftp, published on 9 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
basic-ftp is an FTP client for Node.js. Prior to 5.2.1, basic-ftp allows FTP command injection via CRLF sequences (\r\n) in file path parameters passed to high-level path APIs such as cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), and removeDir(). The library's protectWhitespace() helper only handles leading spaces and returns other paths unchanged, while FtpContext.send() writes the resulting command string directly to the control socket with \r\n appended. This lets attacker-controlled path strings split one intended FTP command into multiple commands. This vulnerability is fixed in 5.2.1.
Weakness: CWE-93
Which versions are affected by CVE-2026-39983?
2 open source packages ship an affected version, including basic-ftp. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
basic-ftp npm | From 5.2.0 | 5.2.1 |
basic-ftp npm | From 5.2.0 | 5.2.1 |
Products include Patrickjuchli Basic-Ftp.
How do I fix CVE-2026-39983?
Upgrade basic-ftp to 5.2.1 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-39983 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39983 exists.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in patrickjuchli basic-ftp
Sources
Also known as CLEANSTART-2026-CT42471, CLEANSTART-2026-KA05451, DEBIAN-CVE-2026-39983, GHSA-chqc-8p9q-pq6q, MINI-2hhf-8934-jfg5, MINI-6pjw-354j-8hqx and 10 more.