What was on port 9091
Port 9091 is documented as Milvus's metrics endpoint. The Go file that builds it names the function registerHTTPServer. The variable that holds the gin handler is named metricsGinHandler. The constant in internal/http/server.go:41 is DefaultListenPort = "9091". The nuclei template that ships with CVE-2026-26190 recommends finding instances with the Shodan query http.html:"404 page not found" port:"9091". Four independent naming choices point at the same word.
This is what metricsGinHandler mounts in v2.6.9, the last unpatched release on the 2.6 line:
metricsGinHandler := gin.Default()
apiv1 := metricsGinHandler.Group(apiPathPrefix) // "/api/v1"
apiv1.Use(httpserver.RequestHandlerFunc)
handlers := httpserver.NewHandlers(s.proxy)
handlers.RegisterRoutesTo(apiv1)
if p, ok := s.proxy.(*proxy.Proxy); ok {
p.RegisterRestRouter(apiv1)
}
Handlers.RegisterRoutesTo lives in internal/distributed/proxy/httpserver/handler.go:42 and registers fifty routes against the gin group it was handed. The first six handle collections:
router.POST("/collection", wrapHandler(h.handleCreateCollection))
router.DELETE("/collection", wrapHandler(h.handleDropCollection))
router.GET("/collection/existence", wrapHandler(h.handleHasCollection))
router.GET("/collection", wrapHandler(h.handleDescribeCollection))
router.POST("/collection/load", wrapHandler(h.handleLoadCollection))
router.DELETE("/collection/load", wrapHandler(h.handleReleaseCollection))
Further down the same file:
router.POST("/entities", wrapHandler(h.handleInsert))
router.DELETE("/entities", wrapHandler(h.handleDelete))
router.POST("/search", wrapHandler(h.handleSearch))
router.POST("/query", wrapHandler(h.handleQuery))
And at the end:
router.POST("/credential", wrapHandler(h.handleCreateCredential))
router.PATCH("/credential", wrapHandler(h.handleUpdateCredential))
router.DELETE("/credential", wrapHandler(h.handleDeleteCredential))
router.GET("/credential/users", wrapHandler(h.handleListCredUsers))
Proxy.RegisterRestRouter at internal/proxy/impl.go:6440 adds the cluster-admin surface on top: every QueryCoord, DataCoord, QueryNode, and DataNode metrics endpoint the cluster exposes, plus database and collection listings. The advisory describes the scope as "all business operations including data manipulation and credential management." There is no metrics-only handler set, no read-only filter, no separate Handlers type. The same httpserver.NewHandlers(s.proxy) constructor the main HTTP server uses for the documented /v1 API is the constructor the metrics port mounts at /api/v1. The word "metrics" appears in the port's name, its variable, and its function. It does not appear in the routes.
Two functions, twelve lines apart
internal/distributed/proxy/service.go declares two HTTP-server setup methods on *Server back to back. Both build a gin handler. Both mount the proxy's REST routes. Both can read proxy.Params.CommonCfg. One installs the authenticate middleware when authorizationEnabled is true. The other does not.
registerHTTPServer at line 155 of v2.6.9, the metrics port:
func (s *Server) registerHTTPServer() {
if !proxy.Params.ProxyCfg.GinLogging.GetAsBool() {
gin.DefaultWriter = io.Discard
gin.DefaultErrorWriter = io.Discard
}
if !proxy.Params.HTTPCfg.DebugMode.GetAsBool() {
gin.SetMode(gin.ReleaseMode)
}
metricsGinHandler := gin.Default()
apiv1 := metricsGinHandler.Group(apiPathPrefix)
apiv1.Use(httpserver.RequestHandlerFunc)
handlers := httpserver.NewHandlers(s.proxy)
handlers.RegisterRoutesTo(apiv1)
if p, ok := s.proxy.(*proxy.Proxy); ok {
p.RegisterRestRouter(apiv1)
}
mhttp.Register(&mhttp.Handler{
Path: mhttp.RootPath,
HandlerFunc: nil,
Handler: metricsGinHandler.Handler(),
})
}
startHTTPServer at line 181 of the same file, the main external HTTP server:
func (s *Server) startHTTPServer(errChan chan error) {
defer s.wg.Done()
ginHandler := gin.New()
ginHandler.Use(httpserver.MetricsHandlerFunc)
ginHandler.Use(accesslog.AccessLogMiddleware)
ginHandler.Use(httpserver.LoggerHandlerFunc(), gin.Recovery())
ginHandler.Use(httpserver.RequestHandlerFunc)
ginHandler.Use(func(c *gin.Context) {
c.Set(httpserver.ContextUsername, "")
})
if proxy.Params.CommonCfg.AuthorizationEnabled.GetAsBool() {
ginHandler.Use(authenticate)
}
app := ginHandler.Group("/v1")
httpserver.NewHandlersV1(s.proxy).RegisterRoutesToV1(app)
appV2 := ginHandler.Group("/v2/vectordb")
httpserver.NewHandlersV2(s.proxy).RegisterRoutesToV2(appV2)
s.httpServer = &http.Server{Handler: ginHandler, ReadHeaderTimeout: time.Second}
// ...
}
The canonical pattern is lines 191 through 193: the if, the ginHandler.Use(authenticate), the closing brace. The divergent function ends on line 179 without it. The authenticate helper is declared at line 127, available by name to both functions. The flag is on proxy.Params.CommonCfg, read by registerHTTPServer already through ProxyCfg.GinLogging and by startHTTPServer through this exact path. Every component the canonical pattern requires is in the file, in scope, twelve lines down from the function that didn't reach for it.
The fix that ships in v2.5.27 and v2.6.10 is the commit on the 2.6 branch:
--- a/internal/distributed/proxy/service.go
+++ b/internal/distributed/proxy/service.go
@@ -166,6 +166,11 @@ func (s *Server) registerHTTPServer() {
metricsGinHandler := gin.Default()
apiv1 := metricsGinHandler.Group(apiPathPrefix)
apiv1.Use(httpserver.RequestHandlerFunc)
+ // Add authentication middleware if authorization is enabled
+ // This ensures the metrics port follows the same security policy as the main HTTP server
+ if proxy.Params.CommonCfg.AuthorizationEnabled.GetAsBool() {
+ apiv1.Use(authenticate)
+ }
handlers := httpserver.NewHandlers(s.proxy)
handlers.RegisterRoutesTo(apiv1)
The committed comment names what the codebase already had: "the same security policy as the main HTTP server." The patch is not a new control. The patch is the same control, in the second place it had to be.
The flag the metrics port never read
common.security.authorizationEnabled is declared in pkg/util/paramtable/component_param.go:793. Its default is false. Its declared Version is 2.0.0. The flag has been the entire user-visible interface for "enable Milvus authentication" since the project's first major release. Every operator who reads the security docs sets it to true. The docs do not enumerate which of the proxy's two HTTP ingresses consult it; the implicit contract is that the flag is the gate.
startHTTPServer honours the contract. registerHTTPServer does not.
An operator who set common.security.authorizationEnabled: true in milvus.yaml before launching saw curl :19530/v2/vectordb/collections/list reject without an Authorization header. The flag did what the docs said it did, on the ingress the docs named. The metrics port, named for what the docs recommended scraping with Prometheus, served the same REST handlers at /api/v1 and consulted nothing.
The exploit primitive against an instance with authorizationEnabled: true:
# Create a new credential on a Milvus instance with authentication
# enabled on the documented REST port.
curl -X POST http://target:9091/api/v1/credential \
-H 'Content-Type: application/json' \
-d '{"username": "attacker", "password": "attacker-chosen"}'
The handler is Handlers.handleCreateCredential at internal/distributed/proxy/httpserver/handler.go:530. It calls h.proxy.CreateCredential(c, &req). The proxy code at the other end of the call does not know which ingress the request entered through. Neither does the gRPC backend the proxy forwards to. The credential persists. The attacker now authenticates to the same /v1 and /v2/vectordb endpoints the operator believed they had closed, with the credential they wrote through the port the operator believed they were scraping for histogram counts.
The same logic exhausts every route in Handlers.RegisterRoutesTo: POST /api/v1/entities to insert, POST /api/v1/search to read, DELETE /api/v1/collection to drop. None of them reach authenticate. None of them ever did.
Parallel implementation gap
This is the parallel-implementation-gap shape, where the canonical pattern lived in the file the whole time and the divergent module never reached for it. The catalog has many exhibits at growing distances. Astro's Cloudflare image endpoint never imported isRemoteAllowed from the canonical module two packages away. MLflow's basic-auth provider gated the legacy Flask app completely and left three of four FastAPI routers public because the two router tables had opposite defaults. Axios's maxContentLength lived inside the buffered branch's chunk counter because the streaming branch had no chunk counter to put it next to. NocoBase's checkSQL covered two of three actions in one object literal because the third action persisted SQL the next call would run.
Milvus is the smallest-distance variant the pattern has surfaced. The canonical and divergent modules are not in different packages, files, branches, or runtimes. They are two functions in the same file, with the same *Server receiver, called from the same Server.init and Server.start plumbing, building handlers from the same httpserver package, gating against the same proxy.Params.CommonCfg.AuthorizationEnabled flag. The function that ends without installing authenticate is twelve lines above the function that installs it.
A single utility that both functions had to call would have closed this gap structurally instead of by copy. There is no such utility. There never was. The codebase ships two HTTP ingresses with overlapping route surfaces and asks each function's author to remember the gate independently. One author remembered. The other did not. The patch does not introduce the shared utility; it retypes the canonical block into the divergent function, leaving the same architecture intact for the next ingress some future author writes.
What 9091 was, what 9091 is
internal/http/server.go:41 declares DefaultListenPort = "9091". The variable that holds the listener's mux is metricsServer. The function that registers default handlers, registerDefaults, mounts /healthz, /livez, /log/level, /eventlog, /expr. The Prometheus exposition lives there too. None of those are wrong; all of those are what the port was named to be.
The fact about port 9091 the codebase did not mark in any naming convention is that the proxy's metricsGinHandler registers under mhttp.RootPath = "/" and catches every request to the same listener that does not have its own explicit handler. The metrics server's http.ServeMux routes /healthz to healthz, /expr to the expression endpoint, and everything else to the gin handler. Everything else includes /api/v1. Everything else includes the proxy's REST API. The port's name described its first four handlers. The fifth handler hosted the database.
The patched releases (v2.5.27 on the 2.5 line, v2.6.10 on the 2.6 line) change which port the fifth handler requires credentials on. They do not change what is hosted there. They do not rename the variable, the function, or the constant. Port 9091 is the metrics port and it has always served the REST API. The metrics port did not become the REST API in the patch. The patch documents that it always was.
PoC: projectdiscovery/nuclei-templates/http/cves/2026/CVE-2026-26190.yaml