Bug Summary
apps/dashboard-api/src/routes/auth.js applies the strict authLimiter (10 requests per 15 minutes) only to POST /login and POST /register. The OTP and password-reset endpoints that follow use router.use(dashboardLimiter), which allows 1000 requests per 15 minutes:
router.post('/register', authLimiter, register);
router.post('/login', authLimiter, login);
router.get('/github/start', startGithubAuth);
router.get('/github/callback', handleGithubCallback);
router.use(dashboardLimiter); // 1000/15min from here onwards
router.post('/send-otp', sendOtp); // should use authLimiter
router.post('/verify-otp', verifyOtp); // should use authLimiter
router.post('/forgot-password', forgotPassword); // should use authLimiter
router.post('/reset-password', resetPassword); // should use authLimiter
An attacker can:
- Enumerate valid OTP values (typically 6 digits = 1,000,000 combinations) by brute-forcing
POST /verify-otp at 1000 attempts per 15 minutes -- far exceeding what authLimiter would allow.
- Flood
POST /send-otp to spam a target's email inbox with OTP messages at high volume.
- Iterate
POST /forgot-password against a list of email addresses to enumerate registered accounts.
Expected Behavior
send-otp, verify-otp, forgot-password, and reset-password should each be explicitly protected by authLimiter (10 requests per 15 minutes), matching the same strict limit applied to login and register.
Actual Behavior
These four endpoints inherit only the permissive dashboardLimiter (1000 requests per 15 minutes).
Affected File
apps/dashboard-api/src/routes/auth.js
@geturbackend I would like to work on this issue. Could you please assign/ it to me? Contributing under GSSoC '26.
Bug Summary
apps/dashboard-api/src/routes/auth.jsapplies the strictauthLimiter(10 requests per 15 minutes) only toPOST /loginandPOST /register. The OTP and password-reset endpoints that follow userouter.use(dashboardLimiter), which allows 1000 requests per 15 minutes:An attacker can:
POST /verify-otpat 1000 attempts per 15 minutes -- far exceeding whatauthLimiterwould allow.POST /send-otpto spam a target's email inbox with OTP messages at high volume.POST /forgot-passwordagainst a list of email addresses to enumerate registered accounts.Expected Behavior
send-otp,verify-otp,forgot-password, andreset-passwordshould each be explicitly protected byauthLimiter(10 requests per 15 minutes), matching the same strict limit applied to login and register.Actual Behavior
These four endpoints inherit only the permissive
dashboardLimiter(1000 requests per 15 minutes).Affected File
apps/dashboard-api/src/routes/auth.js@geturbackend I would like to work on this issue. Could you please assign/ it to me? Contributing under GSSoC '26.