GHSA-r4m5-47cq-6qg8

Suggest an improvement
Source
https://github.com/advisories/GHSA-r4m5-47cq-6qg8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-r4m5-47cq-6qg8/GHSA-r4m5-47cq-6qg8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-r4m5-47cq-6qg8
Published
2020-09-04T17:25:13Z
Modified
2024-01-08T21:29:30Z
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']
});
Database specific
{
    "cwe_ids":  [
        "CWE-918"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:59:34Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / ftp-srv

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
2.19.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-r4m5-47cq-6qg8/GHSA-r4m5-47cq-6qg8.json"

npm / ftp-srv

Package

Affected ranges

Type
SEMVER
Events
Introduced
3.0.0
Fixed
3.1.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-r4m5-47cq-6qg8/GHSA-r4m5-47cq-6qg8.json"

npm / ftp-srv

Package

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
4.3.4

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-r4m5-47cq-6qg8/GHSA-r4m5-47cq-6qg8.json"