CRLF Injection Affecting basic-ftp package, versions <5.2.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about CRLF Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BASICFTP-15953339
  • published9 Apr 2026
  • disclosed8 Apr 2026
  • creditzebbern

Introduced: 8 Apr 2026

NewCVE-2026-39983  (opens in a new tab)
CWE-93  (opens in a new tab)

How to fix?

Upgrade basic-ftp to version 5.2.1 or higher.

Overview

basic-ftp is a FTP client for Node.js, supports FTPS over TLS, IPv6, Async/Await, and Typescript.

Affected versions of this package are vulnerable to CRLF Injection via unsanitized path parameters in the protectWhitespace function. An attacker can execute arbitrary FTP commands by injecting CRLF sequences into file path inputs, which are then interpreted as separate commands by the FTP server. This can lead to unauthorized file deletion, directory manipulation, file exfiltration, command execution on supporting servers, session hijacking, or service disruption.

CVSS Base Scores

version 4.0
version 3.1