CVE-2020-15779: socket.io-file path traversal vulnerability

CVE-2020-15779 · Severity: low · CVSS 3.1 · Published 2020-07-07

socket.io-file is a Node.js library that handles file uploads over WebSocket connections. The library fails to properly validate file paths, allowing an attacker to upload files to arbitrary locations on the server by using path traversal sequences (e.g., ../../). This could enable an attacker to overwrite critical system files or deploy malicious code to the application server.

Technologies: socket.io-file (npm). Vendors: npm.

Quick answers

Is CVE-2020-15779 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-15779 being exploited in the wild.
How severe is CVE-2020-15779?
Low severity, with a CVSS score of 3.1, published 7 July 2020.
Which products and versions are affected?
socket.io-file (npm) SEMVER:introduced=0,last_affected=2.0.31.
Is there a fix for CVE-2020-15779?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2020-15779 attacked?
It is attacked over the network.
Am I affected by CVE-2020-15779?
Check whether you run socket.io-file (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a classic path traversal (CWE-22) flaw in socket.io-file's file upload functionality. When handling the createFile message, the library passes the user-supplied "name" parameter directly to path.join() without sanitization, allowing sequences like ../ to traverse outside the intended upload directory. An unauthenticated attacker can exploit this via the network to craft malicious file upload requests. The vulnerability affects all versions up to and including 2.0.31, with no patched version released as of the advisory date. An attacker can write files to any location on the filesystem where the Node.js process has write permissions.

Affected products

  • Rico socket.io-file <=2.0.31

Identifiers

  • CVE-2020-15779
  • GHSA-9h4g-27m8-qjrg

Timeline

  • 2020-07-07: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.