Skip to content
OpenAdvisories
High · 8.6 Public exploit CVE-2026-39983 EUVD-2026-20976GHSA-chqc-8p9q-pq6q

FTP Command Injection via CRLF in basic-ftp

Published Apr 9, 2026 · Updated Jul 15, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
patrickjuchli basic-ftp < 5.2.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-proxy-agents 0~2025070717+~cs15.3.7-1 —
Debian 13 node-proxy-agents No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-proxy-agents No fix yet —
Ubuntu 26.04 LTS node-proxy-agents No fix yet —
Ubuntu 25.10 node-proxy-agents No fix yet —
Ubuntu 24.04 LTS node-proxy-agents No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling code-server 4.112.0-r3 —
Wolfi rolling langfuse-3-worker 3.164.0-r5 —
Wolfi rolling opensearch-dashboards-3-security-dashboards-plugin 3.5.0-r15 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
npm basic-ftp >= 5.2.0, < 5.2.1 5.2.1 GHSA-chqc-8p9q-pq6q

Advisories 2

References