VDB
Sign up
HIGH

GHSA-r4m5-47cq-6qg8

Server-Side Request Forgery in ftp-srv

Quick fix

GHSA-r4m5-47cq-6qg8 — ftp-srv: upgrade to the fixed version with the command below.

npm install ftp-srv@2.19.6

Details

All versions of `ftp-srv` from v1.0.0 onward to v4.3.3 are vulnerable to Server-Side Request Forgery (SSRF). The package fails to prevent remote clients to access other resources in the network, for example when connecting to the server through telnet. This allows attackers to access any network resources available to the server, including private resources in the hosting environment.

## Recommendation

Upgrade to patched versions `^2.19.6, ^3.1.2, ^4.3.4`

## Workarounds Blacklisting the FTP Command PORT will prevent the server from exposing this behaviour through active connections until a fix is applied.

``` const ftp = new FtpSrv({ blacklist: ['PORT'] }); ```

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/ftp-srv
Introduced in: 1.0.0Fixed in: 2.19.6
Fixnpm install ftp-srv@2.19.6
npm/ftp-srv
Introduced in: 3.0.0Fixed in: 3.1.2
Fixnpm install ftp-srv@3.1.2
npm/ftp-srv
Introduced in: 4.0.0Fixed in: 4.3.4
Fixnpm install ftp-srv@4.3.4

References