CVE-2023-30587 Process-based permissions can be bypassed with the "inspector" module.
The experimental permission model in Node.js 20 could be bypassed using the built-in inspector module. An attacker who could run code under the permission model could use the inspector to escape the restrictions it was meant to enforce.
Originally disclosed on HackerOne
- Paid in 49 days
- Disclosed after 2 months
Summary by the program
###Inspector protocol bypass the experimental permission model (High) (CVE-2023-30587)
A vulnerability in Node.js version 20 allows for bypassing restrictions set by the --experimental-permission flag using the built-in inspector module (node:inspector).
By exploiting the Worker class's ability to create an "internal worker" with the kIsInternal Symbol, attackers can modify the isInternal value when an inspector is attached within the Worker constructor before initializing a new WorkerImpl.
This vulnerability exclusively affects Node.js users employing the permission model mechanism in Node.js 20.
Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
The report
https://hackerone.com/reports/1962701 Restrictions set with the new process based permission flag can by bypassed with the built-in inspector module.
Impact
Permission Model is a mechanism for restricting access to specific resources during execution. This bypasses those restrictions.
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 did not account for the inspector module being able to alter internal worker state, so attaching an inspector inside the Worker constructor let the internal-worker flag be changed before the worker was set up.
Impact
Users relying on the experimental permission model in Node.js 20 could have those restrictions bypassed, though the text notes the model was experimental at the time.
What the attacker needed
Node.js 20 with the permission model enabled; ability to run code under that model
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 limits what a program can do. This report says the built-in inspector could get around those limits.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.