Security context

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

MetaMask/snaps
main @ ff9ec9c
48
Fixes
0
CVEs
HIGH
Peak severity
38.2%
Coverage
Highlights
Auth Bypass: 9 prior fixes. Scrutinize any change in this area.
packages/snaps-controllers/src/snaps/SnapController.ts: most-fixed (9 issues). Treat as high-risk during review.
38 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.

Sandbox Escape: Multiple fixes address sandbox escapes via unhardened globals, unbound function endowments, event property exposure, and late promise handling in teardown. These are critical as they allow snap code to break out of the execution environment.
Privilege Escalation: Permission diff calculations ignoring caveats, rollback of initialConnections, and blocked RPC methods in wallet_invokeMethod can allow snaps to escalate privileges or access sensitive controller data.
Auth Bypass: Missing UI permission checks, unanchored origin regex, and lack of displayed-flag gating allow unauthorized access to interface state and RPC methods.