Skip to content

Commit 3c9de5f

Browse files
committed
doc: add note on weakness of permission model
Malicious JavaScript code can bypass the permission model. Hence, it does not fulfill the requirements of a security mechanism against malicious code.
1 parent 9e8cc29 commit 3c9de5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/permissions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ with those resources.
99
The resource can be entirely allowed or denied, or actions related to it can
1010
be controlled. For example, file system reads can be allowed while denying
1111
writes.
12+
This feature does not protect against malicious code. According to the Node.js
13+
[Security Policy][], Node.js trusts any code it is asked to run.
1214

1315
If you find a potential security vulnerability, please refer to our
1416
[Security Policy][].
@@ -150,6 +152,12 @@ There are constraints you need to know before using this system:
150152

151153
#### Limitations and Known Issues
152154

155+
* The permission model implements a "seat belt" approach, which prevents trusted
156+
code from unintentionally changing files or using resources that access has
157+
not explicitly been granted to. It does not provide security guarantees in the
158+
presence of malicious code. Malicious code can bypass the permission model and
159+
execute arbitrary code without the restrictions imposed by the permission
160+
model.
153161
* Symbolic links will be followed even to locations outside of the set of paths
154162
that access has been granted to. Relative symbolic links may allow access to
155163
arbitrary files and directories. When starting applications with the

0 commit comments

Comments
 (0)