Submitted by bbrho, also found by 0xNazgul, codexploder, infosec_us_team, s3cunda, Saintcode_, and zzzitron
Vault owners can install plugins via Vault.install(), with calls to the installed plugins made through the vaults fallback function. Unlike the vaults external Vault.execute() function, fallback() imposes no checks on the permissions of the caller, assuming proper installation of the plugin by the owner at install time.
While this design seems intentional given NFTReceiver.sol, it can lead to unintended vulnerabilities, like loss of vault NFTs, if the vault owner:
Example successful test similar to those from Vault.t.sol below.
The original vault owner installs a transfer target plugin, with selector ERC721TransferFrom on the vault.
Ownership is then transferred to Bob, but the original owner uses the installed transfer plugin to steal
the NFT deposited in the vault and send it to Alice (without Bobs permission):
Consider tracking which installed plugins might require permissions alongside the methods mapping in storage. Potentially:
with auths[plugin] used in fallback().
stevennevins (Fractional) confirmed
HardlyDifficult (judge) decreased severity to Medium and commented:
