CVE-2026-39983
FTP Command Injection via CRLF in basic-ftp
Also known as GHSA-chqc-8p9q-pq6q
Mitigation
- Upgrade basic-ftp to 5.2.1 or later.
Who should check
- Projects that depend on npm package basic-ftp (>= 5.2.0, < 5.2.1)
- Anyone running patrickjuchli basic-ftp < 5.2.1
Vulnerability facts
- Affected
- basic-ftp >= 5.2.0, < 5.2.1
- Fixed in
- 5.2.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.6 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: High
- Availability impact: Low
- EPSS
- 2.97% chance of exploitation in 30 days (percentile 88, 2026-11-26)
- CWE
- CWE-93
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm basic-ftp | >= 5.2.0, < 5.2.1 | 5.2.1 | osv |
| patrickjuchli basic-ftp | < 5.2.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-39983. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-39983.md Affected: basic-ftp >= 5.2.0, < 5.2.1 Fixed in: 5.2.1 Steps: 1. Search this machine and project for basic-ftp (npm), patrickjuchli basic-ftp: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-39983 being exploited?
There is no confirmed exploitation: CVE-2026-39983 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.97% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-39983?
High: CVSS 8.6 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-39983?
basic-ftp >= 5.2.0, < 5.2.1.
Is there a fix for CVE-2026-39983?
Yes. Fixed in 5.2.1. Upgrade basic-ftp to 5.2.1 or later.
How do I check if I'm affected by CVE-2026-39983?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.