Path traversal in serve-here.js - #VU18922

 

Path traversal in serve-here.js - #VU18922

Published: June 27, 2019 / Updated: June 28, 2019


Vulnerability identifier: #VU18922
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/U:Green
CVE-ID: N/A
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: npm Inc.
Affected software:
serve-here.js

Detailed vulnerability description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to the package accepts pathname of URLs and adds it to the web root without sanitization. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.

PoC:

http://[host]/../../../../etc/passswd

Remediation

Install updates from vendor's website.

Sources