Advisory

GHSA-r4m5-47cq-6qg8

Also known as: None

Summary

Server-Side Request Forgery in ftp-srv

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']
});

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-09-04 17:25 UTC
Modified
2024-01-08 21:29 UTC

Affected packages and fixes

ftp-srv

npm · All systems

Affected

  • introduced 1.0.0, fixed 2.19.6 (semver)

Fixed versions

2.19.6

Fix

ftp-srv

npm · All systems

Affected

  • introduced 3.0.0, fixed 3.1.2 (semver)

Fixed versions

3.1.2

Fix

ftp-srv

npm · All systems

Affected

  • introduced 4.0.0, fixed 4.3.4 (semver)

Fixed versions

4.3.4

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences