basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS)
53
Medium Risk
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.
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.
basic-ftp is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 6.2.1.
Upgrade the basic-ftp library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

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.