The vulnerability is a lack of rate limiting on the login page, which allows for brute-force attacks. The analysis focused on identifying the code responsible for handling login requests. The advisory mentions that versions up to 1.7.4 are vulnerable and that no patch is available. By comparing the git tags for v1.7.4 and the next release candidate, I found a major refactoring of the HTTP server code. This refactoring replaced the gin framework with the standard library's http package.
I identified two vulnerable functions:
AuthAPIRoutes.loginHandler in internal/http/routes/api/v1/auth.go: This was the login handler in the vulnerable versions using the gin framework. It was removed during the refactoring.
api_v1.HandleLogin in internal/http/handlers/api/v1/auth.go: This is the new login handler introduced after the refactoring. It also lacks rate limiting.
Since the vulnerability is still unpatched, both the old and the new login handlers are considered vulnerable. An attacker could exploit this by repeatedly sending login requests to the /api/v1/auth/login endpoint with different passwords until the correct one is found.