@@ -144,6 +144,9 @@ Useful when activating the inspector by sending the `SIGUSR1` signal.
144
144
145
145
Default host is ` 127.0.0.1 ` .
146
146
147
+ See the [ security warning] ( #inspector_security ) below regarding the ` host `
148
+ parameter usage.
149
+
147
150
### ` --inspect[=[host:]port] `
148
151
<!-- YAML
149
152
added: v6.3.0
@@ -155,6 +158,22 @@ V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
155
158
and profile Node.js instances. The tools attach to Node.js instances via a
156
159
tcp port and communicate using the [ Chrome DevTools Protocol] [ ] .
157
160
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
+
158
177
### ` --loader=file `
159
178
<!-- YAML
160
179
added: v9.0.0
@@ -741,6 +760,8 @@ greater than `4` (its current default value). For more information, see the
741
760
[ ScriptCoverage ] : https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
742
761
[ V8 JavaScript code coverage ] : https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
743
762
[ debugger ] : debugger.html
763
+ [ debugging security implications ] : https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications
744
764
[ emit_warning ] : process.html#process_process_emitwarning_warning_type_code_ctor
745
765
[ experimental ECMAScript Module ] : esm.html#esm_loader_hooks
746
766
[ 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