CVE-2020-15152

CVE-2020-15152 is a critical-severity server-side request forgery (SSRF) vulnerability in ftp-srv (npm), affecting versions >= 1.0.0, < 2.19.6. It is fixed in 2.19.6, 3.1.2, 4.3.4.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Server-Side Request Forgery in ftp-srv

Background

The FTP protocol creates two connections, one for commands and one for transferring data.
This second data connection can be created in two ways, on the server by sending the PASV command, or on the client by sending the PORT command.

The PORT command sends the IP and port for the server to connect to the client with.

Issue

Since the client can send an arbitrary IP with the PORT command, this can be used to cause the server to make a connection elsewhere.

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

References

https://www.npmjs.com/advisories/1445

Credits

Thank you to;
@trs for fixing it
@andreeleuterio for reporting it to us for an anonymous user (Vincent) through the NPM platform
@quiquelhappy for bringing it to our attention after it slipped through the cracks during Christmas

For more information

If you have any questions or comments about this advisory:

Impact

Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.

CVE-2020-15152 has a CVSS score of 9.1 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.19.6, 3.1.2, 4.3.4); upgrading removes the vulnerable code path.

Affected versions

ftp-srv (>= 1.0.0, < 2.19.6) ftp-srv (>= 3.0.0, < 3.1.2) ftp-srv (>= 4.0.0, < 4.3.4)

Security releases

ftp-srv → 2.19.6 (npm) ftp-srv → 3.1.2 (npm) ftp-srv → 4.3.4 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

  • fix: disallow PORT connections to alternate hosts: e449e75219d918c400dec65b4b0759f60476abca

Deprecation notices have been published for older versions.

Frequently Asked Questions

  1. What is CVE-2020-15152? CVE-2020-15152 is a critical-severity server-side request forgery (SSRF) vulnerability in ftp-srv (npm), affecting versions >= 1.0.0, < 2.19.6. It is fixed in 2.19.6, 3.1.2, 4.3.4. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
  2. How severe is CVE-2020-15152? CVE-2020-15152 has a CVSS score of 9.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of ftp-srv are affected by CVE-2020-15152? ftp-srv (npm) versions >= 1.0.0, < 2.19.6 is affected.
  4. Is there a fix for CVE-2020-15152? Yes. CVE-2020-15152 is fixed in 2.19.6, 3.1.2, 4.3.4. Upgrade to this version or later.
  5. Is CVE-2020-15152 exploitable, and should I be worried? Whether CVE-2020-15152 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2020-15152 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2020-15152?
    • Upgrade ftp-srv to 2.19.6 or later
    • Upgrade ftp-srv to 3.1.2 or later
    • Upgrade ftp-srv to 4.3.4 or later

Other vulnerabilities in ftp-srv

Stop the waste.
Protect your environment with Kodem.