Worker permission bypass via InternalWorker leak in diagnostics
The diagnostics_channel utility allowed hooking into worker creation, exposing internal worker instances whose constructors could be grabbed and reinstated for malicious usage, affecting Permission Model users.
- Triaged in 5 days
- Fixed in 7 months
- Disclosed after 7 months
Summary by the program
With the aid of the diagnostics_channel utility, an event can be hooked into whenever a worker thread is created. This is not limited only to workers but also exposes internal workers, where an instance of them can be fetched, and its constructor can be grabbed and reinstated for malicious usage.
This vulnerability affects Permission Model users (--permission) on Node.js v20, v22, and v23.
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 diagnostics_channel event for worker creation exposed internal worker instances, allowing their constructors to be captured and reused outside the intended permission checks.
Impact
On affected Node.js versions, internal worker constructors could be grabbed and reinstated for malicious usage, affecting Permission Model users.
What the attacker needed
Node.js v20, v22, or v23; Permission Model enabled (--permission); Ability to run code in the process
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 a Permission Model that limits what a program can do. A debugging tool called diagnostics_channel let a program see internal worker objects and reuse their constructors for malicious usage. This only matters if the program runs with the permission flag enabled.
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.