CVE-2026-39983: FTP Command Injection via CRLF in basic-ftp
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.
Security readout for executives and security teams
Plain-English summary
CVE-2026-39983 affects the Node.js FTP client library basic-ftp before 5.2.1. Applications that pass untrusted file paths into its high-level FTP APIs could let an attacker inject extra FTP commands, potentially changing or deleting remote files.
Executive priority
Treat as high priority for systems that move business files over FTP, especially internet-facing upload or partner-transfer workflows. Upgrade promptly, then validate whether untrusted path data can reach affected APIs.
Technical view
basic-ftp did not neutralize CRLF control characters in path parameters for APIs including cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), and removeDir(). FtpContext.send() then wrote the command to the FTP control socket, allowing one intended command to be split into multiple FTP commands. Version 5.2.1 fixes this.
Likely exposure
Exposure is most likely in Node.js services, automation jobs, file-transfer portals, or integrations that use basic-ftp below 5.2.1 and accept filenames, directory names, or remote paths from users, partners, queues, APIs, or imported data.
Exploitation context
The bundle marks KEV as false and provides no evidence of active exploitation. The flaw is still serious because it is network-reachable in affected application flows, requires low complexity, and can impact integrity on the FTP server.
Researcher notes
The key primitive is FTP command injection through CRLF in path parameters, mapped to CWE-93. The provided evidence names the affected library, vulnerable API surface, root cause, fixed version, commit, release, and Red Hat tracking, but not real-world exploitation.
Mitigation direction
Upgrade basic-ftp to version 5.2.1 or later.
Review applications for untrusted input passed to basic-ftp path APIs.
Block or reject control characters in FTP path inputs at application boundaries.
Check Red Hat advisories if using affected Red Hat-distributed packages.
Follow vendor guidance for any downstream package-specific remediation.
Validation and detection
Inventory package-lock, yarn.lock, pnpm-lock, and SBOM entries for basic-ftp versions.
Confirm deployed runtime artifacts use basic-ftp 5.2.1 or later.
Trace user-controlled path inputs into basic-ftp high-level APIs.
Review FTP logs for unexpected command patterns around user-supplied path operations.
Verify dependency scanners identify CVE-2026-39983 after rescanning.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-93: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-93 · source CWE mapping
Improper Neutralization of CRLF Sequences ('CRLF Injection')
Improper Neutralization of CRLF Sequences ('CRLF Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.