Skip to content

Commit 5496943

Browse files
RafaelGSSaduh95
authored andcommitted
doc: clarify permission model scope for output paths
Flags such --trace-event-file or any other flag that specifies a directory are subject to permission model rules, but a "bypass" isn't considered a vulnerability while it doesn't pose a risk to the user application Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #66004 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 6515db8 commit 5496943

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

SECURITY.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,15 @@ The following are **not** vulnerabilities in Node.js:
522522
* **Operator-controlled flags**: Behavior unlocked by flags the operator
523523
explicitly passes (e.g., `--localstorage-file`) is the operator's
524524
responsibility. The permission model does not restrict how Node.js behaves
525-
when the operator intentionally configures it.
525+
when the operator intentionally configures it. This includes any file or
526+
resource that Node.js itself creates, writes, or reads at a location the
527+
operator selected through a flag, including every path derived from a
528+
template or pattern in that flag. For example, trace files rotated by
529+
`--trace-event-file-pattern` (`${rotation}`) being written without a
530+
matching `--allow-fs-write` entry is not a permission model bypass. Such
531+
paths are part of the operator's configuration, not application file-system
532+
access. Inconsistent checks on these paths are treated as regular bugs and
533+
should be reported through the public issue tracker.
526534

527535
* **`node:sqlite` and the permission model**: `DatabaseSync` operates with the
528536
same file-system privileges as the process. Using SQL pragmas or built-in

doc/api/permissions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ There are constraints you need to know before using this system:
354354
to read files before environment initialization. As a result, such flags are
355355
not subject to the rules of the Permission Model. The same applies for V8
356356
flags that can be set via runtime through `v8.setFlagsFromString`.
357+
* Files that Node.js itself creates, writes, or reads at a location selected
358+
by an operator flag may not be consistently checked against the Permission
359+
Model, in particular when the flag accepts a template or pattern that
360+
expands to several paths. For example, trace files rotated by
361+
`--trace-event-file-pattern` (`${rotation}`) can be written even when the
362+
expanded path is not covered by `--allow-fs-write`. Because the location is
363+
chosen by the operator, gaps like this are treated as regular bugs rather
364+
than vulnerabilities. Please report them through the regular issue tracker.
357365
* OpenSSL engines cannot be requested at runtime when the Permission
358366
Model is enabled, affecting the built-in crypto, https, and tls modules.
359367
* Run-Time Loadable Extensions cannot be loaded when the Permission Model is

0 commit comments

Comments
 (0)