Highlights
Auth Bypass: 2 prior fixes. Scrutinize any change in this area.
packages/metamask-snap/src/api.ts: most-fixed (2 issues). Treat as high-risk during review.
2 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 SSE transport failed to properly validate incoming request message origins and match query session IDs, creating a risk where active sessions could be hijacked or cross-talk could occur. Developers must enforce strict session validation inside the handleMessage pathway.
Auth Bypass: Co-existence of sensitive wallet-mode operations alongside an active HTTP/SSE transport opened up the server to unauthorized cross-origin access. Future modifications to server startup logic must maintain strict CORS controls and block incompatible execution modes.
Information Disclosure: Failing to throw an explicit exception when getPrivateKey returned undefined led to downstream consumers operating under unexpected states. Any function retrieving cryptographic secrets must immediately abort and throw on resolution failure to prevent silent down-level exposure.