fix(browser): block Azure instance metadata endpoint (SSRF)#182
Open
nullxnothing wants to merge 1 commit into
Open
fix(browser): block Azure instance metadata endpoint (SSRF)#182nullxnothing wants to merge 1 commit into
nullxnothing wants to merge 1 commit into
Conversation
v4's isBlockedBrowserHost caught AWS/GCP link-local IMDS and the GCP metadata hostname but missed Azure's IMDS IP 168.63.129.16 — a fixed, public-looking address not covered by the RFC1918 ranges. Block it and cover cloud-metadata endpoints in the test. (Salvaged from the now-stale #152.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-line SSRF hardening salvaged from the now-stale #152.
v4's
isBlockedBrowserHostalready blocks AWS/GCP link-local IMDS (169.254.169.254), the GCP metadata hostname, and RFC1918 ranges — but missed Azure's IMDS at168.63.129.16, a fixed public-looking IP that the private-range checks don't catch. A webview navigating there could exfiltrate instance credentials.BrowserService.ts.BrowserService.test.ts, fail-before/pass-after for the Azure case).Context: #150 and #152 are ~116k lines behind v4; their other security ideas (email validation, rate limiting, SSRF host blocking) already landed on v4 through later commits. This captures the only real remaining delta instead of rebasing those stale forks — recommend closing #150/#152 as superseded.
🤖 Generated with Claude Code