npm
CVE-2026-126346
basic-ftp: Uncaught exception crashes the Node.js process when a password (or resumed-download path) contains CR/LF
- Severity
- Medium 5.9
- Published
- 12 Nov 2026
- Last changed
- 12 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 6.2.3
- Exploit chance
- 1.7% in the next 30 daysHigher than 77% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-r4jh-29pc-gfqr
- Sources
- OSV.dev and GitHub
Description
Client.login() calls FTPContext.send() from inside the control-socket data event handler. send() throws on CR, LF or NUL, and nothing catches the throw. A password containing \r\n therefore raises an uncaught exception and terminates the whole Node.js process. It does not reject the returned promise. Any application that passes untrusted input as the FTP password can be crashed remotely with one request. The same pattern exists in the REST/RETR path of downloadTo() when the remote path contains control characters.
The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly refuses to send commands containing \r, \n or \0:
That works when send() is called from handle(), because it runs inside a Promise executor and the throw becomes a rejection. But in two places send() runs inside a response handler, which is called synchronously from the socket’s data event:
Affected software
| Software | Affected versions |
|---|---|
basic-ftpnpm · osv:npm:basic-ftp |
|
About basic-ftp
- Weekly downloads (npm)
- 33,732,512npm, 24 Nov 2026
Vulnerabilities in basic-ftp
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-126345basic-ftp: Uncaught TypeError in MLSD directory-listing parser via __proto__ fact name causes DoS in Client.list()Medium 5.3 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126346
- GitHub Advisory Database https://github.com/advisories/GHSA-r4jh-29pc-gfqr