fast-http@0.1.2 vulnerabilities

Create a tiny web server which does not support the MVC pattern, for simple Node.js app.

Direct Vulnerabilities

Known vulnerabilities in the fast-http 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

fast-http is a library that allows you to create a tiny web server.

Affected versions of this package are vulnerable to Directory Traversal. There is no path sanitization in the path provided at fs.readFile in index.js.

PoC by JHU System Security Lab

  1. Start the server
    var Server = require("fast-http");
    var srv = new Server(8080,'./',true)
    
  2. Create a file sensitive-file in the server's parent directory
  3. curl -s --path-as-is http://127.0.0.1:8080/../sensitive-file

How to fix Directory Traversal?

A fix was pushed into the master branch but not yet published.

*
  • H
Directory Traversal

fast-http is a Create a tiny web server which does not support the MVC pattern, for simple Node.js app..

Affected versions of the package are vulnerable to Directory Traversal, which may allow access to sensitive files and data on the server. For example, requesting the following url /..%2f..%2fetc/passwd would result in /etc/passwd leak.

How to fix Directory Traversal?

There is no fixed version for fast-http.

*