Intel

AIKIDO-2026-424618

basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-c475-qrg2-pj4r Published 3 days ago

75

High Risk

This Affects:

JSbasic-ftp
0.0.1 - 6.2.0
Fixed in 6.2.1
Are you affected? Scan for Free

TL;DR

The Unix directory-listing parser used by Client.list() relies on a regular expression with two adjacent unbounded capture groups for owner and group names. When a listing line fails to match the expected numeric size and date fields, the regex engine backtracks over every way of splitting those tokens, producing quadratic time relative to line length. A connected FTP server that returns a crafted listing line can freeze the Node.js event loop and cause denial of service. The fix anchors the expressions and bounds the owner and group name repetitions so listing parsing stays linear.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you connect to an FTP server whose directory-listing responses can be untrusted.

Background info

basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 6.2.0.

How to fix this

Upgrade the basic-ftp library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform