fs.fchown/fchmod bypasses permission model
Low
I
Internet Bug Bounty
Submitted None
Actions:
Reported by
4xpl0r3r
Vulnerability Details
Technical details and impact analysis
Hello IBB team, i would like to submit a report about Node.js vulnerability that i have reported to the Node.js team, which was assigned to CVE-2024-36137 and disclosed today. Please check #2472071.
Modifier: I have proposed a fix(-25% shouldn't be apllied) and the feature is experimental (-50%), so I believe the final ratio is 50%.
## Details:
A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-write flag is used.
Node.js Permission Model do not operate on file descriptors, however, operations such as `fs.fchown` or `fs.fchmod` can use a "read-only" file descriptor to change the owner and permissions of a file.
This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21.
Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
## Impact
Node.js Permission Model do not operate on file descriptors, however, operations such as `fs.fchown` or `fs.fchmod` can use a "read-only" file descriptor to change the owner and permissions of a file.
Related CVEs
Associated Common Vulnerabilities and Exposures
CVE-2024-36137
LOW
A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-write flag is used. Node.js Permission Model do not operate on file descriptors, however, operations such as fs.fchown or fs.fchmod can use a "read-only" file descriptor to change the owner and permissions of a …
Report Details
Additional information and metadata
State
Closed
Substate
Resolved
Bounty
$249.00
Submitted
Weakness
Insecure Direct Object Reference (IDOR)