CVE-2026-39983FTP 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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-proxy-agents | Fix pending | UBUNTU-CVE-2026-39983 | |
| Ubuntu 26.04 | node-proxy-agents | Under investigation | UBUNTU-CVE-2026-39983 | |
| Ubuntu 25.10 | node-proxy-agents | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-39983 | |
| Ubuntu 24.04 | node-proxy-agents | Under investigation | UBUNTU-CVE-2026-39983 | |
| Debian 14 | node-proxy-agents | Fixed | 0~2025070717+~cs15.3.7-1 | DEBIAN-CVE-2026-39983 |
| Debian 13 | node-proxy-agents | Fix pending | DEBIAN-CVE-2026-39983 | |
| npm library | basic-ftp | Fixed | 5.2.1 | GHSA-chqc-8p9q-pq6q |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- patrickjuchli basic-ftp: affected: < 5.2.1
References
- https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q
- https://github.com/patrickjuchli/basic-ftp/commit/2ecc8e2c500c5234115f06fd1dbde1aa03d70f4b
- https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.