Skip to content

fix: don't listen on every interface in createTunnel - #675

Draft
VojtaM39 wants to merge 1 commit into
masterfrom
fix/fix-tunnel-connect-vulnerability
Draft

fix: don't listen on every interface in createTunnel#675
VojtaM39 wants to merge 1 commit into
masterfrom
fix/fix-tunnel-connect-vulnerability

Conversation

@VojtaM39

Copy link
Copy Markdown

createTunnel() called server.listen(0) without a host, so the tunnel bound the
unspecified address (:: / 0.0.0.0). Any peer that could reach the host could tunnel
to targetHost using those credentials.

GHSA-5vwf-g8jp-pgj3, #660.

Changes:

  • createTunnel() listens on 127.0.0.1 by default. The port and hostname options
    documented in the README work again — they were dropped from the implementation in v2.0.0.
    Pass hostname: '0.0.0.0' to opt back into the old binding.
  • Warns when bound to a non-loopback address.
  • Tests for the listener address.

Behavior change: the returned endpoint is 127.0.0.1:<port> instead of 0.0.0.0:<port>.

I have also pushed a branch tmp/tunnel-connect-fix-with-repro with repro, that demonstrates that the fix works.

@github-actions github-actions Bot added t-unblocking Issues with this label are in the ownership of the unblocking team. tested Temporary label used only programatically for some analytics. labels Aug 24, 2026
@VojtaM39
VojtaM39 marked this pull request as draft August 24, 2026 16:39
@VojtaM39 VojtaM39 added the adhoc Ad-hoc unplanned task added during the sprint. label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-unblocking Issues with this label are in the ownership of the unblocking team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants