Security context

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

miurla/morphic
main @ 05c0547
18
Fixes
1
CVEs
CRITICAL
Peak severity
Highlights
Auth Bypass: 5 prior fixes. Scrutinize any change in this area.
Next.js: most-fixed (3 issues). Treat as high-risk during review.
14 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.

Remote Code Execution: Critical RCE vulnerabilities (such as CVE-2025-66478) in React Server Components were resolved by upgrading Next.js dependency versions in multiple iterations. Developers must maintain strict control over server component upgrades to avoid execution escapes.
Auth Bypass: Lack of Row-Level Security (RLS) configuration allowed data leaks across tables like chats, messages, and feedback. Mitigations required explicitly enabling RLS and utilizing proper session-based user identifiers instead of anonymous fallbacks.
SQL Injection: Unsafe raw dynamic SQL generation within helper routines (like setting database configurations) bypasses standard ORM safety. Replacing dynamic constructs with parameterized commands is critical when using raw statements.