Port 9229 is the Node.js V8 Inspector protocol port used for debugging. When Node.js starts with --inspect or --inspect-brk, it listens on port 9229 for Chrome DevTools or VS Code debugger connections. Port 9229 must never be exposed externally – it gives an attacker full remote code execution on the Node.js process.
Port Number
9229
Protocol
TCP
Service
Node.js Debug Inspector Protocol
Range
IANA Registered (1024–49151)
Check if debugger is active and which scripts are loaded
curl -s http://localhost:9229/json | jq '.[].title'Verify Node.js inspector binding address (should be 127.0.0.1, never 0.0.0.0)
ss -tlnp | grep 9229Scan network for exposed Node.js debuggers (security audit)
nmap -p 9229 --open 10.0.0.0/24Get Node.js version info from inspector (if reachable, you have RCE)
curl -s http://target:9229/json/version | jq .node --inspect app.js
node --inspect=127.0.0.1:9229 app.js
chrome://inspect in ChromeNode.js switched from the legacy debugger protocol (port 5858) to the V8 Inspector Protocol (port 9229) in Node 6.3.0 (2016). The inspector uses the Chrome DevTools Protocol (CDP), the same protocol Chrome uses for its DevTools. Port 9229 was chosen to avoid conflicts with 9200-9300 (Elasticsearch range). The --inspect flag replaced the deprecated --debug flag entirely in Node 8.
Is it safe to leave --inspect in production?
No. Even bound to localhost, the inspector is a full RCE endpoint. If ANY other vulnerability exists (SSRF, DNS rebinding, port forwarding misconfiguration), it becomes exploitable. Remove --inspect from all production NODE_OPTIONS, Dockerfiles, and PM2 configs. Use APM agents (Datadog, New Relic) for production debugging instead.
How do I debug a remote Node.js process safely?
Start with --inspect=127.0.0.1:9229 (localhost only). SSH tunnel: ssh -L 9229:localhost:9229 production-host. Then open chrome://inspect in your local Chrome, add localhost:9229 as a target. This gives you full DevTools (breakpoints, heap snapshots, CPU profiles) without exposing the port to the network.