Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

sahat/hackathon-starter
master @ 3c8b5ba
28
Fixes
1
CVEs
CRITICAL
Peak severity
71.4%
Coverage
Highlights
CSRF: 7 prior fixes. Scrutinize any change in this area.
app.js: most-fixed (8 issues). Treat as high-risk during review.
13 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

NoSQL Injection: Unsafe dynamic query evaluation via $where in MongoDB callbacks allows attackers to inject logical operations and bypass authentication criteria entirely during external OAuth resolution. This was fixed by replacing dynamic conditions with static Mongoose property queries.
Cross-Site Request Forgery (CSRF): The application repeatedly failed to protect state-changing endpoints because variable naming mismatches (using 'token' instead of '_csrf') caused templates to render undefined or incorrect tokens, disabling validation. Certain routes (such as file uploads) also bypassed the global CSRF middleware.
Auth Bypass: A default empty-string value for the resetPasswordToken schema field allowed unauthenticated attackers to bypass password-reset controls because an empty token parameter successfully matched the default database record value.