Vulnerabilities

CVE-2026-39983

High 8.6 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-04-09
Last modified
2026-10-26
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
Scored by
security-advisories@github.com
Probability of exploitation
2.2 % higher than 81 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
Patrickjuchli Basic-ftp < 5.2.1 Affected

Weakness type

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities