Skip to content

fix(browser): block Azure instance metadata endpoint (SSRF)#182

Open
nullxnothing wants to merge 1 commit into
mainfrom
fix/ssrf-azure-metadata
Open

fix(browser): block Azure instance metadata endpoint (SSRF)#182
nullxnothing wants to merge 1 commit into
mainfrom
fix/ssrf-azure-metadata

Conversation

@nullxnothing
Copy link
Copy Markdown
Owner

One-line SSRF hardening salvaged from the now-stale #152.

v4's isBlockedBrowserHost already blocks AWS/GCP link-local IMDS (169.254.169.254), the GCP metadata hostname, and RFC1918 ranges — but missed Azure's IMDS at 168.63.129.16, a fixed public-looking IP that the private-range checks don't catch. A webview navigating there could exfiltrate instance credentials.

  • Adds the single host block in BrowserService.ts.
  • Test covers AWS/GCP/Azure metadata endpoints (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

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>
@nullxnothing nullxnothing changed the base branch from v4 to main June 1, 2026 22:11
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