The GmxProxy.setPerpVault function uses tx.origin == owner() for validation, which is vulnerable to phishing attacks.
tx.origin checks can be bypassed if the owner interacts with a malicious contract, allowing unintended perpVault assignment.
POC:
Attacker deploys a malicious contract:
Tricks the owner into calling Phisher.phish() (e.g., via a fake UI).
tx.origin becomes the owner’s address, setting perpVault to attackerVault.
Attacker drains funds via attackerVault.
An attacker could trick the owner into initiating a transaction that changes the perpVault address, leading to loss of funds or full control over the vault’s GMX positions.
Manual Review
Replace tx.origin with msg.sender for authorization checks.
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.