CVE-2026-126345
### Summary basic-ftp's MLSD directory-listing parser (src/parseListMLSD.ts) looks up fact-handler functions in a plain object literal keyed directly by fact names taken from the FTP server's response, with no validation. A directory-listing line containing the fact name "__proto__" resolves this lookup to Object.prototype (inherited, non-own, non-function) instead of undefined, so the "not a function" guard is bypassed and the code throws `TypeError: factHandler is not a function`. This TypeError is not an FTPError, so it is not caught by Client.list()'s retry logic and propagates as a rejected promise out of list() and every API built on top of it (list, downloadToDir, uploadFromDir, clearWorkingDir, removeDir). Any FTP server the client connects to — or any on-path attacker on a plaintext (non-TLS) FTP session — can crash the calling application by returning one crafted line in a directory listing. If the application does not wrap every one of these calls in try/catch, the rejection is unhandled and crashes the Node.js process (default behavior since Node 15). ### Details File: src/parseListMLSD.ts ``` const factHandlersByName: {[key: string]: FactHandler} = { "size": parseSize, "sizd": parseSize, "unique": (value, info) => { info.uniqueID = value }, "modify": (value, info) => { ... }, "type": (value, info) => { ... }, "unix.mode": (value, info) => { ... }, ... } export function parseLine(line: string): FileInfo | undefined { const [ packedFacts, name ] = splitStringOnce(line, " ") ... const facts = packedFacts.split(";") for (const fact of facts) { const [ factName, factValue ] = splitStringOnce(fact, "=") if (!factValue) { continue } const factHandler = factHandlersByName[factName.toLowerCase()] // <-- unsafe lookup if (!factHandler) { continue } const result = factHandler(factValue, info) // <-- throws here ... } return info } ``` fact
Properties
- Severity
- medium
- Summary
- basic-ftp: Uncaught TypeError in MLSD directory-listing parser via __proto__ fact name causes DoS in Client.list()
- Nvd fetched at
- 2026-11-14T00:40:25.638091+00:00
- Epss score
- 0.00495
- Cvss severity
- MEDIUM
- Cvss score
- 5.3
- Retrieved at
- 2026-11-14T00:51:03+00:00
- Ghsa published
- 2026-11-12T21:42:12Z
- Source url
- https://github.com/advisories/GHSA-5pm8-86m8-9m6r
- Ghsa updated
- 2026-11-12T21:42:13Z
- Ghsa id
- GHSA-5pm8-86m8-9m6r
- Last source
- FIRST EPSS
- Score
- 5.3
- Cvss version
- 3.1
- Cve id
- CVE-2026-126345
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- First seen by Signal
- 2026-11-13T00:03:24+00:00
- Name
- CVE-2026-126345
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Related Entities (4)
HAS_WEAKNESS (2)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph