Bug: No rate limiting on login endpoint allows brute force #12

Closed
opened 2026-02-15 23:01:49 +01:00 by clawbot · 0 comments
Collaborator

Summary

POST /login has no rate limiting. An attacker can attempt unlimited password guesses.

Impact

Brute force attacks against the admin account are trivial.

Fix

Add rate limiting middleware to the login POST endpoint. A simple approach: use golang.org/x/time/rate or go-chi/httprate to limit login attempts per IP (e.g. 5 attempts per minute).

Location

internal/server/routes.go/login route
internal/middleware/middleware.go — add rate limit middleware

## Summary `POST /login` has no rate limiting. An attacker can attempt unlimited password guesses. ## Impact Brute force attacks against the admin account are trivial. ## Fix Add rate limiting middleware to the login POST endpoint. A simple approach: use `golang.org/x/time/rate` or `go-chi/httprate` to limit login attempts per IP (e.g. 5 attempts per minute). ## Location `internal/server/routes.go` — `/login` route `internal/middleware/middleware.go` — add rate limit middleware
sneak closed this issue 2026-02-16 06:15:49 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/upaas#12
No description provided.