Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

basic-ftp · Vulnerability

CVSS 3.1 5.9 MEDIUMEUVD CVSS 3.1 5.9 CVSS 3.1 · [email protected] · Secondary 5.9 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by basic-ftp 6.2.3KEV status unknown

cve-program · CVE-2026-126346

Published

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Read the publisher's advisory

euvd · EUVD-2026-124724

Published

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Read the publisher's advisory

nvd · CVE-2026-126346

Published

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Read the publisher's advisory

osv · GHSA-r4jh-29pc-gfqr

Published

### Summary 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. ### Details The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly refuses to send commands containing \r, \n or \0: ```ts send(command: string) { if (/[\r\n\0]/.test(command)) { throw new Error(`Invalid command: Contains control characters. (${command})`); } ``` 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: Client.login() (src/Client.ts ~L246-248): after the server answers 331 to USER, the handler calls this.ftp.send("PASS " + password). The USER command was already sent and is valid, so the password is only checked at this point. The call chain is socket.on("data") → _onControlSocketData → _passToHandler → responseHandler → send() → throw. No try/catch exists anywhere in that chain, so it becomes an uncaughtException. downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial command is REST n, which contains no user-controlled text. When the server answers 350, the handler calls config.ftp.send("RETR " + config.remotePath). This remotePath was never checked before. A path with a control character throws in the data handler in the same way. (Found by code reading, not reproduced.) Because the exception happens during data event dispatch, it can’t be handled with try/catch or .catch() around client.access() or downloadTo(). The application only survives if it has a global process.on("uncaughtException") handler. ### Proof of concept Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source). It uses a minimal mock FTP server on localhost: ```js const net = require("net") const ftp = require("basic-ftp") const srv = net.createServer(s => { s.write("220 hi\r\n") s.on("data", d => { const c = d.toString() if (c.startsWith("USER")) s.write("331 pw\r\n") else if (c.startsWith("PASS")) s.write("230 ok\r\n") else s.write("200 ok\r\n") }) }) srv.listen(0, async () => { const c = new ftp.Client(2000) try { await c.access({ host: "127.0.0.1", port: srv.address().port, user: "bob", password: "x\r\nDELE important" // attacker-controlled value }) } catch (e) { console.log("rejected:", e.message) // never reached } console.log("handled gracefully") // never reached process.exit(0) }) ``` Result: the process terminates with an uncaught exception and neither catch nor the final console.log runs: ``` Error: Invalid command: Contains control characters. (PASS x DELE important) at FTPContext.send (dist/FtpContext.js:189:19) at Object.responseHandler (dist/Client.js:186:26) at FTPContext._passToHandler (dist/FtpContext.js:322:24) at FTPContext._onControlSocketData (dist/FtpContext.js:312:18) at Socket.<anonymous> (dist/FtpContext.js:133:44) ``` The server in the PoC is benign. Any normal FTP server that replies 331 to USER triggers the same crash. ### Impact Denial of service (uncaught exception, process termination), CWE-248. It affects applications that pass untrusted or user-influenced values as the FTP password, or as the remote path of a resumed download. Examples are web apps or services that let users enter their own FTP credentials, or file-transfer or backup tools driven by user-supplied paths. One request crashes the whole Node.js process and every other client it serves. It needs no authentication to the FTP server and no special server behaviour. The attacker only needs control over the string. Confidentiality and integrity are not affected, and the CRLF guard still blocks command injection. Suggested fix: In FTPContext._passToHandler(), wrap the handler call in a try/catch that rejects the task and calls closeWithError(err). Validate password in login(), and remotePath in _downloadToStream(), before any I/O and reject early.

Read the publisher's advisory

Affected versions, risk and source history

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

cve-program · CVE-2026-126346

Published

basic-ftp: Uncaught exception crashes the Node.js process when a password (or resumed-download path) contains CR/LF

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Source published
12 Nov 2026 21:42:09 UTC
Source modified
13 Nov 2026 16:03:49 UTC
Saved here
13 Nov 2026 17:56:54 UTC
Source terms
CVE Program Terms of Use

Original source record · Cite this exact observation · Complete original publisher JSON

Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS 3.1 · 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

euvd · EUVD-2026-124724

Published

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's …

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Additional publisher context

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Nov 12, 2026, 9:42:09 PM

dateUpdated: Nov 13, 2026, 4:03:49 PM

Source published
Nov 12, 2026, 9:42:09 PM (timezone not stated)
Source modified
Nov 13, 2026, 4:03:49 PM (timezone not stated)
Saved here
16 Nov 2026 23:32:16 UTC
Source terms
ENISA EUVD · source terms and attribution apply

Original source record · Cite this exact observation · Complete original publisher JSON

Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

EUVD CVSS 3.1 · 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

nvd · CVE-2026-126346

Published

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's …

basic-ftp is an FTP client for Node.js. Prior to 6.2.3, FTPContext.send() throws when a command contains carriage return, line feed, or NUL characters, but calls made from response handlers execute synchronously inside the control socket's data event without an exception boundary. In Client.login(), an attacker-influenced password reaches the PASS command after a server sends a 331 response, and in a resumed download an attacker-influenced remote path reaches the RETR command after a 350 response to REST. The resulting exception does not reject client.access() or downloadTo(), escapes ordinary promise error handling, and terminates the Node.js process, while the validation guard still prevents command injection. This issue is fixed in version 6.2.3.

Additional publisher context

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Deferred

Weakness classifications: CWE-248 · CWE-755

Original publisher date fields

published: 2026-11-12T22:19:19.607

lastModified: 2026-11-13T17:17:25.167

Source published
12 Nov 2026 22:19:19 UTC
Source modified
13 Nov 2026 17:17:25 UTC
Saved here
14 Nov 2026 23:23:18 UTC
Source terms
NIST NVD usage terms; underlying source attribution retained

Original source record · Cite this exact observation · Complete original publisher JSON

Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS 3.1 · [email protected] · Secondary · 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

osv · GHSA-r4jh-29pc-gfqr

Published

basic-ftp: Uncaught exception crashes the Node.js process when a password (or resumed-download path) contains CR/LF

### Summary 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. ### Details The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly refuses to send commands containing \r, \n or \0: ```ts send(command: string) { if (/[\r\n\0]/.test(command)) { throw new Error(`Invalid command: Contains control characters. (${command})`); } ``` 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: Client.login() (src/Client.ts ~L246-248): after the server answers 331 to USER, the handler calls this.ftp.send("PASS " + password). The USER command was already sent and is valid, so the password is only checked at this point. The call chain is socket.on("data") → _onControlSocketData → _passToHandler → responseHandler → send() → throw. No try/catch exists anywhere in that chain, so it becomes an uncaughtException. downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial command is REST n, which contains no user-controlled text. When the server answers 350, the handler calls config.ftp.send("RETR " + config.remotePath). This remotePath was never checked before. A path with a control character throws in the data handler in the same way. (Found by code reading, not reproduced.) Because the exception happens during data event dispatch, it can’t be handled with try/catch or .catch() around client.access() or downloadTo(). The application only survives if it has a global process.on("uncaughtException") handler. ### Proof of concept Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source). It uses a minimal mock FTP server on localhost: ```js const net = require("net") const ftp = require("basic-ftp") const srv = net.createServer(s => { s.write("220 hi\r\n") s.on("data", d => { const c = d.toString() if (c.startsWith("USER")) s.write("331 pw\r\n") else if (c.startsWith("PASS")) s.write("230 ok\r\n") else s.write("200 ok\r\n") }) }) srv.listen(0, async () => { const c = new ftp.Client(2000) try { await c.access({ host: "127.0.0.1", port: srv.address().port, user: "bob", password: "x\r\nDELE important" // attacker-controlled value }) } catch (e) { console.log("rejected:", e.message) // never reached } console.log("handled gracefully") // never reached process.exit(0) }) ``` Result: the process terminates with an uncaught exception and neither catch nor the final console.log runs: ``` Error: Invalid command: Contains control characters. (PASS x DELE important) at FTPContext.send (dist/FtpContext.js:189:19) at Object.responseHandler (dist/Client.js:186:26) at FTPContext._passToHandler (dist/FtpContext.js:322:24) at FTPContext._onControlSocketData (dist/FtpContext.js:312:18) at Socket.<anonymous> (dist/FtpContext.js:133:44) ``` The server in the PoC is benign. Any normal FTP server that replies 331 to USER triggers the same crash. ### Impact Denial of service (uncaught exception, process termination), CWE-248. It affects applications that pass untrusted or user-influenced values as the FTP password, or as the remote path of a resumed download. Examples are web apps or services that let users enter their own FTP credentials, or file-transfer or backup tools driven by user-supplied paths. One request crashes the whole Node.js process and every other client it serves. It needs no authentication to the FTP server and no special server behaviour. The attacker only needs control over the string. Confidentiality and integrity are not affected, and the CRLF guard still blocks command injection. Suggested fix: In FTPContext._passToHandler(), wrap the handler call in a try/catch that rejects the task and calls closeWithError(err). Validate password in login(), and remotePath in _downloadToStream(), before any I/O and reject early.

Source published
12 Nov 2026 22:23:50 UTC
Source modified
12 Nov 2026 22:30:03 UTC
Saved here
12 Nov 2026 23:16:39 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS_V3 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Publisher rating · MODERATE

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 17 Nov 02:47 UTC · 274 of 275 readable · 250 fully read · 20 waiting for GitHub's hourly limit · documentation 469/469 current