Security context

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

yearn/yearn-vaults-v2
master @ 97ca1b2
6
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Auth Bypass: 2 prior fixes. Scrutinize any change in this area.
contracts/BaseStrategy.sol: most-fixed (2 issues). Treat as high-risk during review.
4 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: BaseStrategy clone and proxy deployments were vulnerable to unauthorized initialization. This allows malicious actors to hijack the implementation contract if the state initialization is not properly restricted or split.
Auth Bypass: The emergency shutdown control logic allowed lower-privileged roles like the guardian to disable emergency shutdown, which should be restricted exclusively to governance to prevent premature resumption of operations.
Logic Error: The withdrawal process burned user shares before calculating their proportional underlying value, leading to severe miscalculations of redeemed token amounts.