The _yieldFeeRecipient can claim some of the fees earned in the vault by calling mintYieldFee. The function has no access control so anyone can call the function and claim the yield fee for themselves.
Proof of Concept
In the below test an attacker (Alice) mints the yield fee share to an controlled address (0xf) without being authorized to call the function.
Lines of code
https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L394-L395
Vulnerability details
Impact
The
_yieldFeeRecipient
can claim some of the fees earned in the vault by callingmintYieldFee
. The function has no access control so anyone can call the function and claim the yield fee for themselves.Proof of Concept
In the below test an attacker (
Alice
) mints the yield fee share to an controlled address (0xf) without being authorized to call the function.Tools Used
Manual review, VSCode
Recommended Mitigation Steps
Add access control so that only the fee recipient can call the function:
Assessed type
Access Control