Skip to content

Commit 69fb71f

Browse files
tniessentargos
authored andcommittedOct 2, 2024
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. PR-URL: #54268 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 83b2cb9 commit 69fb71f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎doc/api/permissions.md

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ be accessed by other modules.
1515
The resource can be entirely allowed or denied, or actions related to it can
1616
be controlled. For example, file system reads can be allowed while denying
1717
writes.
18+
This feature does not protect against malicious code. According to the Node.js
19+
[Security Policy][], Node.js trusts any code it is asked to run.
20+
21+
The permission model implements a "seat belt" approach, which prevents trusted
22+
code from unintentionally changing files or using resources that access has
23+
not explicitly been granted to. It does not provide security guarantees in the
24+
presence of malicious code. Malicious code can bypass the permission model and
25+
execute arbitrary code without the restrictions imposed by the permission
26+
model.
1827

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

0 commit comments

Comments
 (0)
Please sign in to comment.