Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Router allows exec paths hidden behind dot segments (/./exec, /x/../exec)

クローズ
#70 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, go, rust, typescript

調査の方向性

Read the router implementations and the existing empty segment checks in Go, Rust, and TypeScript, then inspect the spec flags and properties named in the issue. Add the dot segment cases to each router table and mirror the ALLOW_EMPTY_INTERIOR and emptySegmentsHideNoExec coverage. Done means dot segments are denied for every method in all three implementations, with the requested curl --path-as-is integration check passing.

索引モデルが issue の本文から書いたものです。

説明

Priority: P2 Type: Bug

Describe the bug
The router allows exec paths hidden behind dot segments. GET /./exec/<id>/json and GET /x/../exec/<id>/json have a first segment of . or x, so the exec check (#49) does not match and the GET passthrough forwards them. This is the same class as the //exec/... bypass fixed for #55 (empty path segment not allowed), which only covers empty segments.

Found in the review of the #55 Task 3 PR. Router-level probe on that branch (Route("GET", path)):

Path Go TS Rust
/./exec/abc/json Allow Allow Allow (by code reading, not probed)
/x/../exec/abc/json Allow Allow Allow (by code reading, not probed)
/containers/./mycontainer/exec Deny (exec) Deny (exec) Deny (exec)

Impact: as with // before #55, a live daemon is expected to answer dot-segment paths with a 301 to the clean path, so nothing should leak. A client that follows the redirect re-enters the proxy on the clean path and is denied. But the router allows an exec path, which the spec's intent forbids, and it depends on daemon behaviour the proxy does not control.

Affected implementation(s)

  • All

To Reproduce

  1. Any policy.
  2. curl --path-as-is --unix-socket proxy.sock 'http://localhost/./exec/<id>/json'
  3. The proxy forwards it (the daemon's answer, not a proxy 403).

Expected behavior
Deny any path with a . or .. segment for every method, right after the empty-segment check, e.g. dot path segment not allowed. Same check in Go, Rust and TS; a spec flag and property mirroring ALLOW_EMPTY_INTERIOR / emptySegmentsHideNoExec (exec path after dot-segment removal ⇒ denied); table rows in all three; an integration check with curl --path-as-is.

Alternatives considered:

  • Normalise the path (RFC 3986 remove_dot_segments) and route on the result. Rejected: the proxy would then forward a path different from the one it routed, or have to rewrite it; denying is simpler and the Docker CLI never sends dot segments.
  • Rely on the daemon's 301. Rejected for the same reason as #55: the router should not allow an exec path at all.

Environment

  • Docker 29.4.0 (OrbStack), branch fix/empty-segment-head-55.

Additional context
README.md and spec/README.md on that branch say dot segments are not denied yet.

主要言語
Rust
スター
2
フォーク
0
平均マージ
14時間 26分
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ChainSafe/docker-socket-policy のほかの issue

ChainSafe/docker-socket-policy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。