From 69193c63c3fe9a647c7d5644c331d3c091d45a3e Mon Sep 17 00:00:00 2001 From: Paolo Insogna Date: Thu, 19 Nov 2026 13:33:33 +0100 Subject: [PATCH] doc: clarify that --allow-net covers local sockets Document that Unix domain sockets and Windows named pipes are governed by `--allow-net` and are not checked against `--allow-fs-read` or `--allow-fs-write`. Assisted-By: OpenAI GPT-5.6 Sol Signed-off-by: Paolo Insogna --- doc/api/cli.md | 3 +++ doc/api/permissions.md | 7 +++++++ doc/node.1 | 2 ++ 3 files changed, 12 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 52ea6f3f10e1..d286c73c42ec 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -411,6 +411,9 @@ network by default. Attempts to do so will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the `--allow-net` flag when starting Node.js. +This includes Unix domain sockets and Windows named pipes. Their paths are not +checked against [`--allow-fs-read`][] or [`--allow-fs-write`][]. + Example: ```js diff --git a/doc/api/permissions.md b/doc/api/permissions.md index 2cf99bd167ab..73cffbace243 100644 --- a/doc/api/permissions.md +++ b/doc/api/permissions.md @@ -87,6 +87,13 @@ flag. For WASI, use the [`--allow-wasi`][] flag. For FFI, use the [`--allow-ffi`][] flag. The [`node:ffi`](ffi.md) module is only available in builds with FFI support. +Unix domain sockets and Windows named pipes are governed by the network +permission. Binding, listening on, or connecting to them through `node:net` +requires [`--allow-net`][] and is not checked against [`--allow-fs-read`][] or +[`--allow-fs-write`][], even though a Unix domain socket is created as a file +system entry. Granting [`--allow-net`][] therefore allows creating sockets and +connecting to local services at any path the operating system permits. + To allow use of OpenSSL STORE loaders, for example to load a private key from a {URL} passed to [`crypto.createPrivateKey()`][], use the [`--allow-openssl-store`][] flag. diff --git a/doc/node.1 b/doc/node.1 index 5da352d7472b..9ea64bab70fb 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -256,6 +256,8 @@ When using the Permission Model, the process will not be able to access network by default. Attempts to do so will throw an \fBERR_ACCESS_DENIED\fR unless the user explicitly passes the \fB--allow-net\fR flag when starting Node.js. +This includes Unix domain sockets and Windows named pipes. Their paths are not +checked against \fB--allow-fs-read\fR or \fB--allow-fs-write\fR. Example: .Bd -literal const http = require('node:http');