setPerpVault() function do not validate addresses before setting them, leading to potential misconfigurations or contract hijacking.
• setPerpVault() incorrectly checks ownership:
• tx.origin is not reliable as it can be spoofed via external calls.
• There is no validation for market address.
• Contract takeover risk if an attacker injects a malicious vault address.
• Possible permanent loss of funds if an incorrect address is set.
• Manual Code Review
• Slither Static Analysis
• Replace tx.origin with msg.sender:
• Validate input addresses before setting them:
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.