Skip to content
Path traversal Disclosed report Advanced CVE-2023-39331

Permission model improperly protects against path traversal

The permission model in Node.js did not prevent an application from overwriting built-in utility functions with user-defined implementations, allowing a path traversal bypass. An attacker could potentially read files outside the permitted directories.

tniessen Follow

Originally disclosed on HackerOne

High 7.7 View original
  • Triaged in under an hour
  • Fixed in 2 months
  • Disclosed after 2 months

Summary by the program

A previously disclosed vulnerability (CVE-2023-30584) was patched insufficiently in commit 205f1e6. The new path traversal vulnerability arises because the implementation does not protect itself against the application overwriting built-in utility functions with user-defined implementations.

Please note that at the time this CVE is issued, the permission model is an experimental feature of Node.js.

The original report as published on HackerOne, by tniessen. 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

Root cause

Likely the permission model relied on built-in utility functions that could be replaced by the application, so the path checks could be subverted.

Impact

An attacker could potentially bypass the permission model to access files outside the allowed paths, though the feature is experimental.

What the attacker needed

Node.js with permission model enabled; application can overwrite built-in functions

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.

Node.js has an experimental feature that restricts which files a program can access. This report says that restriction could be bypassed if the program itself replaced certain built-in functions with its own versions. That could let someone read files they should not be able to reach.

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 tniessen

View all

15 more disclosed reports, best first.

More from Node.js

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.