| タイトル | go-kratos kratos 2.9.2 Unintended Route Exposure via DefaultServeMux Fallback |
|---|
| 説明 | The Kratos HTTP server (`transport/http/server.go`) sets `http.DefaultServeMux` as the fallback handler for both unmatched routes (`NotFoundHandler`) and disallowed methods (`MethodNotAllowedHandler`).
In Go, `http.DefaultServeMux` is a global, shared ServeMux instance. Numerous standard library and third-party packages automatically register handlers on it during `init()`. The most notable example is `net/http/pprof`, which registers debug profiling endpoints. Kratos itself ships a pprof wrapper package (`transport/http/pprof`) that imports `net/http/pprof`. |
|---|
| ソース | ⚠️ https://github.com/go-kratos/kratos/issues/3810 |
|---|
| ユーザー | Yu_Bao (UID 89348) |
|---|
| 送信 | 2026年04月04日 15:51 (22 日 ago) |
|---|
| モデレーション | 2026年04月24日 21:43 (20 days later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 359545 [go-kratos 迄 2.9.2 http.DefaultServeMux Fallback transport/http/server.go NewServer 特権昇格] |
|---|
| ポイント | 20 |
|---|