Skip to content

Path Traversal in socket.io-file

High severity GitHub Reviewed Published Jul 7, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm socket.io-file (npm)

Affected versions

<= 2.0.31

Patched versions

None

Description

All versions of socket.io-file are vulnerable to Path Traversal. The package fails to sanitize user input and uses it to generate the file upload paths. The socket.io-file::createFile message contains a name option that is passed directly to path.join(). It is possible to upload files to arbitrary folders on the server by sending relative paths on the name value, such as ../../test.js. The uploadDir and rename options can be used to define the file upload path.

References

Reviewed Jul 7, 2020
Published to the GitHub Advisory Database Jul 7, 2020
Last updated Jan 9, 2023

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Weaknesses

CVE ID

CVE-2020-15779

GHSA ID

GHSA-9h4g-27m8-qjrg
Checking history
See something to contribute? Suggest improvements for this vulnerability.