The setPerpVault()
function in GmxProxy
contract uses tx.origin
for access control:
Using tx.origin
for authorization is dangerous as it makes the contract vulnerable to phishing attacks through malicious intermediate contracts, because tx.origin
always points to the original sender:
owner
-> malicious contract that calls GmxProxy
-> GmxProxy::setPerpVault
- tx.origin
will be owner
If an attacker tricks the owner into interacting with this malicious contract, it could be critical for the protocol.
If a phishing attack is successful, the attacker can:
Set a malicious perpVault address
Potentially gain control over protocol operations
Manipulate price validations and keeper operations
Use msg.sender
instead of tx.origin
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.