CVE-2026-102990: basic-ftp Quadratic-Time CPU Denial of Service in Client.list() Unix Directory-Listing Parser

basic-ftp Updated 01 Oct 2026

Summary

01/10/2026
Yes i
High
8.2

CVE-2026-102990: Client.list() parses the server's directory listing with the Unix-style parser in parseListUnix.js. Affects basic-ftp versions < 6.2.1. Fixed in 6.2.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

basic-ftp is an FTP client for Node.js that allows users to interact with FTP servers for file transfers. It provides a simple API for connecting to FTP servers, listing directories, and uploading or downloading files. The package is widely used due to its ease of use and efficiency in handling FTP operations. However, it is vulnerable to a denial of service attack due to a flaw in its Unix-style directory-listing parser, which can lead to significant performance degradation when processing maliciously crafted directory listings.

Vulnerability Detail

The vulnerability arises from the Client.list() method, which utilizes a Unix-style parser in parseListUnix.js. The regex used for parsing directory listings contains two adjacent groups that can cause excessive backtracking when processing certain inputs. If a line in the directory listing starts with a valid prefix but fails to satisfy the expected tokens, the regex engine may backtrack excessively, resulting in a quadratic time complexity (O(n²)) for matching. This can lead to the Node.js event loop being blocked for extended periods, effectively causing a denial of service. The impact is severe, as a single maliciously crafted line can freeze the entire process, making it unresponsive.

How To Fix

Latest published version: 6.2.3 as of 23 Oct 2026

npm install basic-ftp@6.2.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.2.1

This is the first release that contains the fix.

npm install basic-ftp@6.2.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the maximum size of directory listings processed by the client by setting the maxListingBytes option to a lower value. This can help mitigate the impact of the vulnerability by preventing excessively large listings from being processed. Example code to set this option is as follows:

const ftp = require('basic-ftp');
const client = new ftp.Client();

client.ftp.maxListingBytes = 1024 * 1024; // Set max listing size to 1 MB

Conclusion

The basic-ftp package has a significant vulnerability (CVE-2026-102990) that can lead to denial of service through its directory-listing parser. It is crucial to update to version 6.2.1 or later to mitigate this risk. Additionally, using Vulert can help you monitor for such vulnerabilities in your applications effectively.

See every vulnerability recorded for basic-ftp →

Share this vulnerability

FAQ

CVE-2026-102990 is a vulnerability in the basic-ftp package that allows for a denial of service due to a quadratic-time CPU usage issue in the Client.list() method.

If your application uses the basic-ftp package, a malicious FTP server could exploit this vulnerability to freeze your application by sending specially crafted directory listings.

The CVSS score of this vulnerability is 8.2, indicating a high severity level.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By checking your package-lock.json file, Vulert can help you identify if your application is affected by this vulnerability.

Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup or installation.

Related vulnerabilities

Recent vulnerabilities recorded for basic-ftp.

How To Fix

Latest published version: 6.2.3 as of 23 Oct 2026

npm install basic-ftp@6.2.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.2.1

This is the first release that contains the fix.

npm install basic-ftp@6.2.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback