FTP Command Injection via CRLF in basic-ftp

Summary

CVECVE-2026-39983
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-04-09 18:17:02 UTC
Updated2026-04-09 20:16:26 UTC
Descriptionbasic-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.

Risk And Classification

Primary CVSS: v3.1 8.6 HIGH from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L

Problem Types: CWE-93 | CWE-93 CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary8.6HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
3.1CNADECLARED8.6HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Patrickjuchli Basic-ftp affected < 5.2.1 Not specified

References

ReferenceSourceLinkTags
github.com/patrickjuchli/basic-ftp/commit/2ecc8e2c500c5234115f06fd1dbde1... [email protected] github.com
github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q 134c704f-9b21-4f2e-91b3-4a467353bcc0 github.com
github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.1 [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report