CVE-2026-39983 FTP Command Injection via CRLF in basic-ftp
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebianRed Hat
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.
Upgrade path
14 packages: 4 fixed, 10 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/node-proxy-agents(Debian 13) | = 0~2024040606-6; = 0~2024040606-6+deb13u1; = 0~2025070717+~cs15.2.7-1; = 0~2025070717+~cs15.3.7-1 +11 more | No fix listed | No fix yet |
| redhat ansible portal | All versions | No fix listed | No fix yet |
| redhat openshift | All versions | No fix listed | No fix yet |
| redhat openshift ai | All versions | No fix listed | No fix yet |
| redhat/redhat-user-workloads/ansible-plugins(Red Hat ansible_portal 2) | All versions | No fix listed | No fix yet |
| redhat/rhdh/rhdh-hub-rhel9:1776784286(Red Hat rhdh 1.8 el9) | All versions | No fix listed | No fix yet |
| redhat/rhdh/rhdh-hub-rhel9:1777903262(Red Hat rhdh 1.9 el9) | All versions | No fix listed | No fix yet |
| ubuntu/node-proxy-agents(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/node-proxy-agents(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/node-proxy-agents(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/node-proxy-agents(Debian 14) | < 0~2025070717+~cs15.3.7-1; = 0~2024040606-6; = 0~2025070717+~cs15.2.7-1; = 0~2025070717-1 +5 more | 0~2025070717+~cs15.3.7-1 | Fixed |
| npm basic-ftp(npm) | = 5.2.0; >= 5.2.0, < 5.2.1 | 5.2.1 | Fixed |
| patrickjuchli basic-ftp | < 5.2.1; = < 5.2.1 | 5.2.1 | Fixed |
| redhat rhdh | < 1776784286; < 1777903262 | 1776784286, 1777903262 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| patrickjuchli basic-ftp | = < 5.2.1 | No fix listed |
| redhat rhdh | < 1776784286 | 1776784286 |
| redhat rhdh | < 1777903262 | 1777903262 |
| redhat openshift ai | All versions | No fix listed |
| redhat openshift | All versions | No fix listed |
| redhat ansible portal | All versions | No fix listed |
| npm basic-ftp(npm) | = 5.2.0 | No fix listed |
| debian/node-proxy-agents(Debian:13) | All versions | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2024040606-6 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2024040606-6+deb13u1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs15.2.7-1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs15.3.7-1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs15.3.8-1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs15.3.8-2 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs15.3.8-3 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717+~cs16.2.9-1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-1 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-2 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-3 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-4 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-5 | No fix listed |
| debian/node-proxy-agents(Debian:13) | = 0~2025070717-6 | No fix listed |
| debian/node-proxy-agents(Debian:14) | < 0~2025070717+~cs15.3.7-1 | 0~2025070717+~cs15.3.7-1 |
| debian/node-proxy-agents(Debian:14) | = 0~2024040606-6 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717+~cs15.2.7-1 | No fix listed |
Show 14 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-1 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-2 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-3 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-4 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-5 | No fix listed |
| debian/node-proxy-agents(Debian:14) | = 0~2025070717-6 | No fix listed |
| redhat/rhdh/rhdh-hub-rhel9:1776784286(Red Hat:rhdh:1.8::el9) | All versions | No fix listed |
| redhat/rhdh/rhdh-hub-rhel9:1777903262(Red Hat:rhdh:1.9::el9) | All versions | No fix listed |
| redhat/redhat-user-workloads/ansible-plugins(Red Hat:ansible_portal:2) | All versions | No fix listed |
| ubuntu/node-proxy-agents(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/node-proxy-agents(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/node-proxy-agents(Ubuntu:26.10) | All versions | No fix listed |
| patrickjuchli basic-ftp | < 5.2.1 | 5.2.1 |
| npm basic-ftp(npm) | >= 5.2.0, < 5.2.1 | 5.2.1 |
References
- https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-chqc-8p9q-pq6q exploit mitigation vendor-advisory
- https://github.com/patrickjuchli/basic-ftp/commit/2ecc8e2c500c5234115f06fd1dbde1aa03d70f4b patch
- https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.1 product release-notes
- Red Hat CVE page mitigation vdb-entry vendor-advisory
- RHBZ#2456971 issue-tracking
- security.access.redhat.com
- RHSA-2026:9742 patch vendor-advisory
- RHSA-2026:13826 patch vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- Debian Security Tracker CVE-2026-39983 vendor-advisory
- www.cve.org
- Ubuntu CVE tracker vendor-advisory
- bugs.debian.org issue-tracking
- github.com product