Lucene search

K
hackeroneN0n4meH1:357109
HistoryMay 24, 2018 - 5:10 p.m.

Node.js third-party modules: [simplehttpserver] List any file in the folder by using path traversal.

2018-05-2417:10:48
n0n4me
hackerone.com
35

0.009 Low

EPSS

Percentile

82.8%

I would like to report Path Traversal in simplehttpserver. It allows to list any file in another folder of web root.

Module

module name: simplehttpserverversion:0.1.1npm page: https://www.npmjs.com/package/simplehttpserver

Module Description

‘simpehttpserver’ is an simple imitation of python’s SimpleHTTPServer and is intended for testing, development and debugging purposes

Module Stats

[444] downloads in the last week

Vulnerability

Vulnerability Description

simpehttpserver is simply get the path name of url and add it to the web root. it means if you input …/, it will happy add it to web root and you can list the folder you choose. But the trick is web browser or curl are also to try rebuild the url containing …/. I used the burp to make a raw url and send it to server.

Steps To Reproduce:

install simplehttpserver
$ npm install simplehttpserver -g

start program
$ simplehttpserver ./

start burpsuite and enter the url contain …/. you should see the files in the folder.
{F301226}

Patch

filter … in the path name.

Supporting Material/References:

Configuration I’ve used to find this vulnerability:

  • kali linux 4.15.0
  • nodejs v8.11.2
  • npm 6.1.0
  • Burpsuite community

Wrap up

  • I contacted the maintainer to let them know: N
  • I opened an issue in the related repository: N

Impact

This vulnerability allows malicious user to list file in the folder. This might expose vectors to attack system with Remote Code Execution, reveals files with usernames and passwords and many other possibilites.

0.009 Low

EPSS

Percentile

82.8%