Security context

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

matter-labs/zksync-era
main @ 3e29e4a
11
Fixes
0
CVEs
HIGH
Peak severity
14.3%
Coverage
Highlights
Auth Bypass: 5 prior fixes. Scrutinize any change in this area.
Compose: most-fixed (1 issue). Treat as high-risk during review.
9 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.

Auth Bypass: The external node synchronization component accepted batch transaction status updates from the main node without verifying them against Layer 1 receipts, creating a risk of processing spoofed or unfinalized batch states. Ensure all synchronized state updates are validated with L1 logs using BatchStatusUpdater.
SQL Injection: Token insertions and witness generator database operations utilized raw string construction and COPY statements instead of parameterized queries, leaving the DAL vulnerable to SQL injection. All database interactions in the DAL must use safe query builders or parameterized bindings.
Auth Bypass: The private-rpc service exposed critical endpoints (such as user retrieval) with weak or improperly sourced authentication checks, such as accepting credentials via query parameters rather than headers. Secure endpoints should enforce header-based token validation.