org.mvnpm:basic-ftp@6.2.3

  • latest version

    6.2.5

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    22 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:basic-ftp package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Prototype Pollution

    org.mvnpm:basic-ftp is a FTP client for Node.js, supports FTPS over TLS, IPv6, Async/Await, and Typescript.

    Affected versions of this package are vulnerable to Prototype Pollution via the parseLine function in src/parseListMLSD.ts, which looks up fact-handler functions in a plain object literal keyed directly by fact names taken from the FTP server's MLSD directory-listing response without validating that the key is an own property. When a directory-listing line contains the fact name __proto__, the bracket lookup factHandlersByName["__proto__"] returns Object.prototype itself - a truthy, non-undefined value - bypassing the if (!factHandler) guard and causing the code to throw TypeError: factHandler is not a function. This TypeError is not an FTPError, so it is not caught by Client.list()'s retry logic and propagates as a rejected promise out of list() and every API built on top of it (downloadToDir, uploadFromDir, clearWorkingDir, removeDir), crashing the Node.js process when the rejection is unhandled.

    How to fix Prototype Pollution?

    Upgrade org.mvnpm:basic-ftp to version 6.2.4 or higher.

    [,6.2.4)