-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: inspector security warning for changing host to a public IP #23640
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,9 @@ Useful when activating the inspector by sending the `SIGUSR1` signal. | |
|
||
Default host is `127.0.0.1`. | ||
|
||
See the [security warning](#inspector_security) below regarding the `host` | ||
parameter usage. | ||
|
||
### `--inspect[=[host:]port]` | ||
<!-- YAML | ||
added: v6.3.0 | ||
|
@@ -155,6 +158,22 @@ V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug | |
and profile Node.js instances. The tools attach to Node.js instances via a | ||
tcp port and communicate using the [Chrome DevTools Protocol][]. | ||
|
||
<a id="inspector_security"></a> | ||
#### Warning: binding inspector to a public IP:port combination is insecure | ||
|
||
Binding the inspector to a public IP (including `0.0.0.0`) with an open port is | ||
insecure, as it allows third-party hosts to connect to the inspector and perform | ||
a [remote code execution][] attack. | ||
|
||
If you specify a host, make sure that at least one of the following is true: | ||
either the host is not public, or the port is properly firewalled to disallow | ||
unwanted connections. | ||
|
||
**More specifially, `--inspect=0.0.0.0` is insecure if the port (`9229` by | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be worthwhile linking to this page that talks about things in more detail: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Specifically typo |
||
default) is not firewall-protected.** | ||
|
||
See the [debugging security implications][] section for more information. | ||
|
||
### `--loader=file` | ||
<!-- | ||
added: v9.0.0 | ||
|
@@ -738,6 +757,8 @@ greater than `4` (its current default value). For more information, see the | |
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage | ||
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html | ||
[debugger]: debugger.html | ||
[debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications | ||
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor | ||
[experimental ECMAScript Module]: esm.html#esm_loader_hooks | ||
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html | ||
[remote code execution]: https://www.owasp.org/index.php/Code_Injection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't external hosts be better than third-party here? We don't even have a second party here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix, thanks!