The setPerpVault function uses tx.origin for authorization.
tx.origin
-based protection can be abused by a malicious contract, tx.origin
refers to the original external account that initiated the transaction, not the immediate caller (msg.sender
. A malicious smart contract can trick a legitimate user into interacting with setPerpVault()
, bypassing the security checks, and could gain control over perpVault
.
Unauthorized Contract Ownership Change
Contract manipulation
Loss of funds
Manual review
Do not use tx.origin
for authorization.
Replace:
With:
Lightchaser: Medium-5
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.