Description
basic-ftp is an FTP client for Node.js. Prior to 6.2.1, Client.list() can be forced by a malicious or compromised FTP server to spend quadratic CPU time parsing a directory listing because the RE_LINE expression in src/parseListUnix.ts backtracks across adjacent variable-length owner and group fields when a long Unix-style line has a valid prefix but cannot satisfy the later size and date fields. parseList() selects a parser from the last nonblank line and then applies it to every line, so a normal final line can select the Unix parser while an earlier crafted line blocks the Node.js event loop and freezes the process. This issue is fixed in version 6.2.1.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| patrickjuchli | basic-ftp | < 6.2.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-proxy-agents | 0~2025070717+~cs16.2.9-1 | — |
| Debian 13 | node-proxy-agents | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | node-proxy-agents | No fix yet | — |
| Ubuntu 26.04 LTS | node-proxy-agents | No fix yet | — |
| Ubuntu 24.04 LTS | node-proxy-agents | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | code-server | 4.140.0-r1 | — |
| Wolfi rolling | opensearch-dashboards-3-security-dashboards-plugin | 3.8.0-r10 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | basic-ftp | < 6.2.1 | 6.2.1 | GHSA-c475-qrg2-pj4r |