Skip to content

fix(bug-detectors): handle connect(port, host) in ssrf tcp hook#890

Open
metsw24-max wants to merge 1 commit into
CodeIntelligenceTesting:mainfrom
metsw24-max:ssrf-tcp-connect-port-host
Open

fix(bug-detectors): handle connect(port, host) in ssrf tcp hook#890
metsw24-max wants to merge 1 commit into
CodeIntelligenceTesting:mainfrom
metsw24-max:ssrf-tcp-connect-port-host

Conversation

@metsw24-max
Copy link
Copy Markdown

hookTCPSocket maps argument count to the documented Socket.connect overloads, but the two-argument branch only handles connect(options, listener). The connect(port, host) form with no listener falls through unchecked, so the SSRF allowlist is never consulted and a target calling socket.connect(8080, "evil.com") evades detection. The new branch routes the (port, host) case through detectSSRF like the three-argument path. Tests cover numeric and string ports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant