Intel

AIKIDO-2026-221764

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

GHSA-5rfr-xx34-2xxvPublished Oct 8, 2026
October 8, 2026

53

CVE Score

Medium

Regular Expression Denial of Service (ReDoS)

Are you affected? Scan for Free

TL;DR

basic-ftp's MLSD directory listing detector and PASV response parser use regular expressions that backtrack quadratically on crafted FTP server input. A listing line of repeated = characters with no ;, or a 227 PASV reply with a long run of digits and no commas, makes the regex engine retry every split point and blocks the Node.js event loop for seconds. Both inputs come directly from the connected FTP server, so a malicious or compromised server can freeze the client application during list() or a passive mode transfer. The fix excludes = from MLSD fact names and adds a lookbehind in the PASV parser so neither regex retries at every character.

How do I fix this?

Upgrade the basic-ftp library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you connect to an untrusted or compromised FTP server.

Package

Versions

0.0.1 - 6.2.1

Fixed in 6.2.2

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea