You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Security bypass via duplicate routes and missing Rate Limiters in server.js #2342
Several critical routing and security misconfigurations exist in server.js:
Duplicate & Misplaced Routes:app.use() registrations for /api/books, /api/jobs, /api/courses, and /api/google-calendar are duplicated at the very bottom of the file, after app.listen() and error handlers.
Rate Limit Bypass: The primary app.use("/api/google-calendar", ...) registration does not include the generalLimiter. Because Express matches the first defined route, the second registration (which has the limiter) is completely ignored. This creates a severe security vulnerability, allowing attackers or bots to bypass rate limits and send unlimited, unfiltered requests to this endpoint. The /api/roadmaps route is also entirely missing the generalLimiter.
Steps to Reproduce
Start the backend server.
Send repeated, rapid requests (e.g., refreshing a browser or using a script) to http://localhost:5000/api/google-calendar or /api/roadmaps.
Observe that the server continues to process the requests indefinitely without returning a 429 Too Many Requests status, confirming the rate limit bypass.
Expected Behavior
All API routes should be registered before app.listen(). Sensitive and public-facing routes like /api/google-calendar and /api/roadmaps must enforce the generalLimiter to block spam requests and prevent DDoS attempts (returning a 429 status when limit is exceeded).
Actual Behavior
Missing limiters on initial route declarations and duplicated route registrations allow unrestricted access, completely bypassing the intended rate-limiting security mechanisms.
Severity
Critical
Screenshots / Screen Recording
No response
Browser
Not Applicable (Backend/Security Issue)
Operating System
Windows 11
Additional Context
I have already investigated this locally. By removing the duplicate routes at the bottom of the file, moving /api/google-calendar to the main route block, and attaching generalLimiter to all necessary endpoints, the rate limits are correctly enforced.
Hi maintainers, I have already refactored the routes and fixed this security issue locally. Could you please assign this to me? I will raise a Pull Request immediately.
I’ll clean up the duplicate route registrations in server.js, ensure all API routes are registered before app.listen(), and apply generalLimiter to the affected endpoints, including /api/google-calendar and /api/roadmaps.
I’ll also verify the routing order and test that repeated requests are properly rate-limited with the expected 429 response, while preserving the existing route behavior.
I’ve reviewed the routing and rate-limiting problems described here, including the duplicate route registrations, the missing generalLimiter on /api/google-calendar, and the missing limiter on /api/roadmaps.
I can fix the route registration order, remove the duplicate registrations, apply the appropriate rate limiting, and verify that the affected endpoints correctly return 429 Too Many Requests when the limit is exceeded.
This issue has had no activity for 14 days and has been marked as stale. If this is still relevant, please leave a comment or push an update within the next 7 days, otherwise it will be closed automatically to keep the tracker clean.
This issue has had no activity for 14 days and has been marked as stale. If this is still relevant, please leave a comment or push an update within the next 7 days, otherwise it will be closed automatically to keep the tracker clean.
Activity
github-actions commentedon Sep 30, 2026
Thanks for creating this issue!
If you'd like to work on it, simply comment:
The first person to claim the issue will be assigned automatically.
Happy contributing!
shan2003034 commentedon Sep 30, 2026
Hi maintainers, I have already refactored the routes and fixed this security issue locally. Could you please assign this to me? I will raise a Pull Request immediately.
28106 commentedon Sep 30, 2026
Hi, @shan2003034 I’d like to work on this issue.
I’ll clean up the duplicate route registrations in
server.js, ensure all API routes are registered beforeapp.listen(), and applygeneralLimiterto the affected endpoints, including/api/google-calendarand/api/roadmaps.I’ll also verify the routing order and test that repeated requests are properly rate-limited with the expected
429response, while preserving the existing route behavior.chetna123-ch commentedon Oct 6, 2026
Hi, I’d like to work on this issue.
I’ve reviewed the routing and rate-limiting problems described here, including the duplicate route registrations, the missing
generalLimiteron/api/google-calendar, and the missing limiter on/api/roadmaps.I can fix the route registration order, remove the duplicate registrations, apply the appropriate rate limiting, and verify that the affected endpoints correctly return
429 Too Many Requestswhen the limit is exceeded.Please assign this issue to me. Thank you! 🚀
shrinivas-sn commentedon Oct 16, 2026
/claim
github-actions commentedon Oct 16, 2026
✅ @shrinivas-sn has successfully claimed this issue!
You've been assigned. Happy coding!
github-actions commentedon Oct 31, 2026
This issue has had no activity for 14 days and has been marked as
stale. If this is still relevant, please leave a comment or push an update within the next 7 days, otherwise it will be closed automatically to keep the tracker clean.shrinivas-sn commentedon Oct 31, 2026
PR #2383 has been submitted and is currently awaiting maintainer review.
github-actions commentedon Nov 15, 2026
This issue has had no activity for 14 days and has been marked as
stale. If this is still relevant, please leave a comment or push an update within the next 7 days, otherwise it will be closed automatically to keep the tracker clean.shrinivas-sn commentedon Nov 16, 2026
Still active and relevant! The fix is implemented, verified, and submitted in PR #2383 (#2383), currently awaiting maintainer review.