basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS)
53
CVE Score
Medium
Regular Expression Denial of Service (ReDoS)
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.
Upgrade the basic-ftp library to the patch version.
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.
0.0.1 - 6.2.1
Fixed in 6.2.2basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 6.2.1.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.