An attacker can transfer 99% of his shares to another account and then trigger cancelParticipation() to get a total refund of his stake.
He would be refunded in total but only 1% of his shares would be burned. He can then get the 99% shares he transfered before, back to his account and use them later on, for free.
https://github.com/CodeHawks-Contests/2025-11-brivault/blob/main/src/briVault.sol#L280-L288
Here stakedAsset[msg.sender] will be refunded but only shares = balanceOf(msg.sender) will be burned.
The normal behavior would have been to refund the exact corresponding shares held by the user account.
Likelihood: High
Easy to reproduce, simply transfer 99% of the shares to another account before calling cancelParticipation()
Impact: High
Get 99% of the shares for free
Step 1 : Transfer 99% of the shares to another account
Step 2 : Trigger cancelParticipation() to get refunded of the total amount staked
Step 3 : Transfer back the 99% of shares
Step 4 : Now the user have 99% of the previous shares for FREE.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.