Navigation guard misses redirect hops to private addresses
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- security
調査の方向性
Read the page.route('**/*') handler and the existing assertPublicUrl and isPublicHost checks; then find the tests for request routing. Add a test where a public URL redirects to a private address, and verify that the redirect is blocked before the browser follows it.
索引モデルが issue の本文から書いたものです。
説明
The SSRF guard from #18 checks the initial URL (assertPublicUrl) and every request seen by page.route('**/*'). Playwright only calls the route handler for the first URL in a redirect chain, so a public URL that redirects to a private or link-local address is followed without being checked.
Reproduction (appwrite/browser 0.3.5, Appwrite Cloud staging and production, 2026-10-04/05):
/v1/avatars/screenshots?url=https://httpbin.org/redirect-to?url=http%3A%2F%2F169.254.169.254%2Flatest%2Fmeta-data%2Fpasses the API's URL validator (the initial host is public), and the browser follows the redirect to169.254.169.254. The request timed out after 30s with nothing returned, apparently because the address isn't reachable from the pod. The guard did not stop it.- A direct private URL, or a hostname that resolves privately (
10.0.0.1.nip.io), is refused, but by the API's validator before the browser is involved.
Expected: every hop is checked with isPublicHost, and a redirect to a non-public host aborts the navigation (blockedbyclient).
Possible fix: in the route handler, fetch with redirects disabled (route.fetch({ maxRedirects: 0 })). On a 3xx, resolve Location against the request URL, check it with isPublicHost, and either abort or route.fulfill the redirect response so the browser re-requests the next hop, which passes through the handler again. Add a test with a public redirect to a private address.
Context: appwrite-labs/cloud#6236 (cloud runs 0.3.5 since 2026-10-05).
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 2
- 平均マージ
- 21分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
appwrite/docker-browser のほかの issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
appwrite/docker-browser#15 ·
appwrite/docker-browser の issue をすべて見る
似ている issue
-
bug go
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
genkit-ai/genkit#6761 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-agent#136483 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
facioquo/stock-indicators-dotnet#2316 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vercel-labs/skills#2460 ·
メンテナーはふだん 1 日以内に返信