The vulnerability was caused by the unconditional registration of Go's net/http/pprof debugging endpoints on the main, public-facing API server. This was done in the api.NewServer function. Compounding this, the main.main function explicitly configured the authentication middleware to treat /debug/pprof as a public, unauthenticated prefix. This allowed any network-reachable user to access sensitive debugging information and trigger performance-intensive profiling, leading to information disclosure and denial-of-service.
A secondary, defense-in-depth flaw existed in the auth.NewMiddleware function, which used a weak prefix matching logic (strings.HasPrefix). This would have allowed an attacker to bypass authentication for any path that shared a prefix with a legitimate public route.
The patch addresses these issues comprehensively. It removes the pprof middleware from the public server entirely. Instead, it introduces a new, opt-in mechanism (startDebugPprofIfEnabled) in cmd/arc/main.go that, when enabled via an environment variable, runs the pprof server on a separate, localhost-only port, isolating it from the public API. Additionally, the prefix matching in auth.NewMiddleware was hardened to prevent similar bypass vulnerabilities in the future. During exploitation, a runtime profiler would have shown calls to functions within the net/http/pprof package, such as pprof.Profile (for DoS) or pprof.Index (for information leakage), originating from unauthenticated HTTP requests.