Highlights
Auth Bypass: 7 prior fixes. Scrutinize any change in this area.
src/lib/server/auth.ts: most-fixed (6 issues). Treat as high-risk during review.
16 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.
SSRF: The application resolves and fetches external URLs for model context and web search. Attackers can bypass naive host/IP validation via DNS rebinding and HTTP redirect chaining, reaching internal metadata and services. Connection-time IP validation and manual redirect validation must be strictly enforced.
Cross-Site Scripting (XSS): Rendering model-generated markdown as raw HTML via Svelte tags allows malicious payload injection. The project repeatedly patched sanitization bypasses, eventually adopting robust server and client-side HTML sanitizers to isolate dangerous tags.
Auth Bypass: Insecure session lookup and token handling allowed potential administrative actions and session hijacking. Fixes required migrating to hashed database-backed session IDs, proper session regeneration, and consistent SameSite/Secure cookie attributes.