Skip to content

Commit

Permalink
doc: add note on weakness of permission model
Browse files Browse the repository at this point in the history
Malicious JavaScript code can bypass the permission model. Hence, it
does not fulfill the requirements of a security mechanism against
malicious code.

PR-URL: #54268
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
tniessen authored and RafaelGSS committed Aug 21, 2024
1 parent 7f68cc0 commit 8883c01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ with those resources.
The resource can be entirely allowed or denied, or actions related to it can
be controlled. For example, file system reads can be allowed while denying
writes.
This feature does not protect against malicious code. According to the Node.js
[Security Policy][], Node.js trusts any code it is asked to run.

The permission model implements a "seat belt" approach, which prevents trusted
code from unintentionally changing files or using resources that access has
not explicitly been granted to. It does not provide security guarantees in the
presence of malicious code. Malicious code can bypass the permission model and
execute arbitrary code without the restrictions imposed by the permission
model.

If you find a potential security vulnerability, please refer to our
[Security Policy][].
Expand Down

0 comments on commit 8883c01

Please sign in to comment.