The GmxProxy contract uses tx.origin for owner authorization in the setPerpVault function, which is an unsafe practice that could allow phishing attacks to bypass access controls.
In GmxProxy.sol, the setPerpVault function uses tx.origin to verify the owner:
tx.origin refers to the original externally owned account (EOA) that initiated the transaction, rather than the immediate caller (msg.sender). This creates a vulnerability where an attacker could trick the owner into interacting with a malicious contract that then calls setPerpVault.
Medium severity
The vulnerability could allow an attacker to set an unauthorized perpVault address if they can trick the owner into interacting with a malicious contract
Since setPerpVault can only be called once and sets a core protocol component, this could potentially compromise the system's security
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.