Dependency Policy Bypass via process.binding
The deprecated process.binding() API can be used to load internal modules and bypass the experimental policy mechanism, allowing an attacker to run arbitrary code outside the limits defined in policy.json.
- Triaged in 5 days
- Fixed in 4 months
- Disclosed after 4 months
Summary by the program
The use of the deprecated API process.binding() can bypass the policy mechanism by requiring internal modules and eventually take advantage of process.binding('spawn_sync') run arbitrary code, outside of the limits defined in a policy.json file.
This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x and, 20.x.
Please note that at the time this CVE was issued, the policy is an experimental feature of Node.js.
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 policy mechanism does not block access to the deprecated process.binding() API, which can load internal modules and bypass the intended restrictions.
Impact
An attacker could run arbitrary code outside the limits defined in policy.json, affecting all users of the experimental policy mechanism in Node.js 16.x, 18.x, and 20.x.
What the attacker needed
Node.js with experimental policy enabled
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 called a policy that is meant to restrict what code can do, like a set of rules. A built-in but deprecated function called process.binding() can be used to get around those rules and run any code, even though the policy says it should not be allowed.
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.