Vulnerabilities in pkg:npm/ftp-srv
PACKAGEGHSA-r4m5-47cq-6qg8 is a HIGH server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Ftp srv libraries in the npm ecosystem. The issue involves server-side request forgery in ftp-srv. Remediation is available by upgrading affected packages to version 2.19.6, 3.1.2, 4.3.4.
pkg:npm/ftp-srv
Vulnerability advisories affecting package pkg:npm/ftp-srv. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r4m5-47cq-6qg8 | - | HIGH | Server-Side Request Forgery in ftp-srv |
| GHSA-pmw4-jgxx-pcq9 | CVE-2020-26299 | MODERATE | File System Bounds Escape |
| GHSA-jw37-5gqr-cf9j | CVE-2020-15152 | CRITICAL | Server-Side Request Forgery in ftp-srv |
GHSA-r4m5-47cq-6qg8 at a Glance
How to Fix GHSA-r4m5-47cq-6qg8
To remediate this vulnerability, upgrade all affected Ftp srv dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install ftp-srv@2.19.6
npm install ftp-srv@3.1.2
npm install ftp-srv@4.3.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ftp-srv
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-r4m5-47cq-6qg8, inspect your project dependencies using npm:
npm ls ftp-srv
Analyze the terminal output to locate any version of Ftp srv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.19.6), your application is affected.
Note: The npm ls ftp-srv command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Ftp srv, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-r4m5-47cq-6qg8 Affected Ftp srv Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ftp-srv
|
npm |
≥ 1.0.0
< 2.19.6
|
2.19.6
|
|
ftp-srv
|
npm |
≥ 3.0.0
< 3.1.2
|
3.1.2
|
|
ftp-srv
|
npm |
≥ 4.0.0
< 4.3.4
|
4.3.4
|
References
Frequently Asked Questions
What is GHSA-r4m5-47cq-6qg8?
Which Ftp srv versions are affected?
What version fixes GHSA-r4m5-47cq-6qg8?
Is ftp-srv affected?
What CWE is associated with GHSA-r4m5-47cq-6qg8?
How can I check npm dependencies for GHSA-r4m5-47cq-6qg8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r4m5-47cq-6qg8",
"modified" : "2024-01-08T21:29:30Z",
"published" : "2020-09-04T17:25:13Z",
"aliases" : [ ],
"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.\n\n\n## Recommendation\n\nUpgrade to patched versions\n`^2.19.6, ^3.1.2, ^4.3.4`\n\n## Workarounds\nBlacklisting the FTP Command PORT will prevent the server from exposing this behaviour through active connections until a fix is applied.\n\n```\nconst ftp = new FtpSrv({\n blacklist: ['PORT']\n});\n```",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ftp-srv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "2.19.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "ftp-srv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "ftp-srv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.3.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/QuorumDMS/ftp-srv/security/advisories/GHSA-jw37-5gqr-cf9j"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/QuorumDMS/ftp-srv"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1445"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:59:34Z",
"nvd_published_at" : null
}
}