Vulnerability in basic-ftp (CVE-2026-102990)
Summary
Vulnerability in basic-ftp (CVE-2026-102990). Risk of unauthorized operations or information disclosure. Exploitable via parseListUnix.js. Mitigation: upgrade to 6.2.1 or later.
Original description
The description as published by the source.
Summary
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.
The 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.
Proof of concept
npm i basic-ftp && node repro.js:
const net = require("net"), ftp = require("basic-ftp");
const KB = Number(process.env.LINE_KB || 128);
const payload = "-rw-r--r-- 1 " + "a ".repeat((KB * 1024 - 13) / 2) + "!";
const listing = payload + "\r\n-rw-r--r-- 1 owner group 42 Jan 1 2020 file.txt\r\n";
const server = net.createServer(c => {
c.setEncoding("latin1"); c.write("220 ok\r\n"); let buf = "";
c.on("data", d => { buf += d; let i;
while ((i = buf.indexOf("\r\n")) !== -1) {
const cmd = buf.slice(0, i).toUpperCase(); buf = buf.slice(i + 2);
if (cmd.startsWith("USE…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-102990 has been found in basic-ftp.
Attackers can target a specific entry point like parseListUnix.js over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade basic-ftp to 6.2.1 or later.
If unsure, ask your IT team or search "basic-ftp CVE-2026-102990" on the vendor's site.
CVE-2026-102990 (basic-ftp) — CWE-1333
Attack surface: parseListUnix.js / RE_LINE / maxListingBytes
Patched: 6.2.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-1333) exists in basic-ftp. Attackers reach the vulnerable code path via parseListUnix.js.
Check the vendor advisory for the affected versions of basic-ftp. Attack surface: parseListUnix.js / RE_LINE / maxListingBytes.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 6.2.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'basic-ftp' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'basic-ftp' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
basic-ftpを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade basic-ftp to 6.2.1ステージング環境で 6.2.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com