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

(CVE-2023-32004) Permission model bypass by specifying a path traversal sequence in a Buffer

Node.js 20's experimental permission model failed to properly handle Buffers passed to file system APIs, so a path traversal sequence inside a Buffer could slip past the permission check. An attacker able to run code under the permission model could therefore reach files the model was meant to restrict.

haxatron1 Follow

Originally disclosed on HackerOne

  • Triaged in 44 hours
  • Fixed in 29 days
  • Paid in 29 days
  • Disclosed after 59 days

Summary by the program

###Permission model bypass by specifying a path traversal sequence in a Buffer (HIGH)(CVE-2023-32004)

A vulnerability has been discovered in Node.js version 20, specifically within the experimental permission model. This flaw relates to improper handling of Buffers in file system APIs causing a traversal path to bypass when verifying file permissions.

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

Impacts:

This vulnerability affects all users using the experimental permission model in Node.js 20.

The report

https://nodejs.org/en/blog/vulnerability/august-2023-security-releases#permission-model-bypass-by-specifying-a-path-traversal-sequence-in-a-buffer-highcve-2023-32004

https://hackerone.com/reports/2038134

Also, patch was provided in the report and matched https://github.com/nodejs/node/commit/1f64147eb607f82060e08884f993597774c69280 (excluding tests).

Impact

see reports.

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

Users of the experimental permission model in Node.js 20 could have file permission restrictions bypassed, though the feature was experimental at the time.

What the attacker needed

Node.js 20 with the permission model enabled; ability to run code under that model

The fix

A patch was provided in the report and matched an upstream commit.

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 optional experimental feature that tries to limit which files a program may read or write. The check looked at the path as normal text but not when the path was supplied as raw bytes (a Buffer), so a path containing '..' steps could sneak past the check. That means code running under these limits could still get to files it should not.

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 haxatron1

View all

30 more disclosed reports, best first.

More from Internet Bug Bounty

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.