The setPerpVault
function in the contract uses tx.origin
to check permissions, ensuring that only the owner of the contract is allowed to perform this operation. This poses a high potential security risk, especially vulnerable to phishing attacks.
In the setPerpVault
function, permissions are checked based on the condition:
This means that whoever initiates the transaction (EOA - Externally Owned Account) whose address matches the owner()
is considered valid, regardless of how many intermediary contracts the transaction passes through.
Phishing attack scenario:
The attacker deploys a malicious contract and sends it to the legitimate owner of the target contract.
When the owner interacts with the malicious contract, the contract calls the setPerpVault
function of the target contract.
Since tx.origin
is the owner EOA address, the target contract will misunderstand this transaction as valid and allow the attacker to make changes to the perpVault address.
Referer:
Can be phising attack to changes to the perpVault address
manual
Use msg.sender to check the authority
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.