CVE-2026-39983 Details
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.
A command injection vulnerability has been identified in basic-ftp, a Node.js FTP client, in version 5.2.0. The issue arises from improper handling of file path parameters, which can be exploited by injecting CRLF sequences. This injection allows attackers to manipulate FTP commands sent to the server, potentially leading to unauthorized file deletions, directory modifications, or exploitation of certain FTP server features, such as executing system commands on the server.
Users can upgrade to basic-ftp version 5.2.1, which addresses the vulnerability by rejecting CRLF injection attempts in file path parameters. For those unable to upgrade, an immediate workaround is to manually sanitize FTP path inputs by removing or rejecting control characters before using them with basic-ftp commands.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/errata/RHSA-2026:13826 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:9742 | redhat-SADP | |
| https://access.redhat.com/security/cve/CVE-2026-39983 | redhat-SADP | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2456971 | redhat-SADP | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39983.json | redhat-SADP | |
| https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/patrickjuchli/basic-ftp/commit/2ecc8e2c500c5234115f06fd1dbde1aa03d70f4b | [email protected] | Patch |
| https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.1 | [email protected] | ProductRelease Notes |
| https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-93 | Improper Neutralization of CRLF Sequences ('CRLF Injection') | redhat-SADP |
| CWE-93 | Improper Neutralization of CRLF Sequences ('CRLF Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| patrickjuchli basic-ftp | < 5.2.1 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 14, 2026 | Initial Analysis | [email protected] |
| Apr 9, 2026 | CVE Modified | CISA-ADP |
| Apr 9, 2026 | New CVE Received | [email protected] |