CVE-2026-49397: Nezha's private services (`EnableShowInService: false`) are enumerable via per-server endpoints, leaking name and timing data
The EnableShowInService flag on a Service is meant to gate that service’s visibility from the public dashboard. The main service-listing endpoint (GET /api/v1/service → showService) correctly filters services with EnableShowInService: false via ServiceSentinel.CopyStats() (service/singleton/servicesentinel.go:421-438). However, two adjacent reader endpoints retrieve service objects through code paths that do not honor the same flag:
GET /api/v1/server/:id/service(listServerServices) iteratesServiceSentinel.GetSortedList()(which returns every service regardless of visibility) and emits service ID, name, and timing data for any service monitoring the queried server.GET /api/v1/service/:id/history(getServiceHistory) callsServiceSentinel.Get(serviceID)directly and emits the service name (and aggregated per-server stats for servers the viewer can see).
Both endpoints are mounted on the optionalAuth group, so an unauthenticated visitor can enumerate hidden services as long as they can guess a public server ID (linear scan over a small numeric ID space) or a service ID (likewise). The service owner’s intent — “hide this from the public” via EnableShowInService: false — is silently bypassed.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-49397 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →