The setPerpVault function in the GmxProxy contract improperly uses tx.origin for ownership verification. This authentication method is insecure because an attacker can exploit it through a phishing attack, tricking the contract owner into unknowingly approving a malicious vault address. This can lead to user funds being redirected to a malicious vault.
Issue: tx.origin Should Not Be Used for Authentication
tx.origin can be manipulated by an attacker who tricks the contract owner into calling a malicious contract. This allows unauthorized updates to the perpetual vault, leading to fund redirection.
More helpful information:
Funds can be redirected to an attacker's vault.
Loss of control over the perpetual vault.
Manual review
Replace tx.origin with the onlyOwner modifier.
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.