@@ -144,6 +144,9 @@ Useful when activating the inspector by sending the `SIGUSR1` signal.
144144
145145Default host is `127.0.0.1`.
146146
147+ See the [security warning](#inspector_security) below regarding the `host`
148+ parameter usage.
149+
147150### `--inspect[=[host:]port]`
148151<!-- YAML
149152added: v6.3.0
@@ -155,6 +158,22 @@ V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
155158and profile Node.js instances. The tools attach to Node.js instances via a
156159tcp port and communicate using the [Chrome DevTools Protocol][].
157160
161+ <a id="inspector_security"></a>
162+ #### Warning: binding inspector to a public IP:port combination is insecure
163+
164+ Binding the inspector to a public IP (including `0.0.0.0`) with an open port is
165+ insecure, as it allows external hosts to connect to the inspector and perform
166+ a [remote code execution][] attack.
167+
168+ If you specify a host, make sure that at least one of the following is true:
169+ either the host is not public, or the port is properly firewalled to disallow
170+ unwanted connections.
171+
172+ **More specifically, `--inspect=0.0.0.0` is insecure if the port (`9229` by
173+ default) is not firewall-protected.**
174+
175+ See the [debugging security implications][] section for more information.
176+
158177### `--loader=file`
159178<!-- YAML
160179added: v9.0.0
@@ -741,6 +760,8 @@ greater than `4` (its current default value). For more information, see the
741760[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
742761[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
743762[debugger]: debugger.html
763+ [debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications
744764[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor
745765[experimental ECMAScript Module]: esm.html#esm_loader_hooks
746766[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html
767+ [remote code execution]: https://www.owasp.org/index.php/Code_Injection
0 commit comments