提交 #797099: go-kratos kratos 2.9.2 Unintended Route Exposure via DefaultServeMux Fallback信息

标题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分 (21 日前)
管理2026-04-24 21時43分 (20 days later)
状态已接受
VulDB条目359545 [go-kratos 直到 2.9.2 http.DefaultServeMux Fallback transport/http/server.go NewServer 权限提升]
积分20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!