DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

The function setPerpVault uses tx.origin to authenticate the caller instead of using msg.sender.

Summary

The function setPerpVault uses tx.origin to authenticate the caller instead of using msg.sender.

Vulnerability Details

  • Authentication Weakness: Using tx.origin allows an attacker to trick the owner into initiating an unintended transaction through a malicious intermediary contract.

  • Single Call Limitation: Although the function is designed to be called only once, it still poses a risk if the call is initiated indirectly.

Impact

  • Unauthorized Access: An attacker could potentially set the perpetual vault address if the owner is tricked, compromising the contract.

  • Phishing Risks: It opens the door for phishing-style attacks that exploit the trust relationship of the owner.

Tools Used

Manual review

Recommendations

Replace tx.origin with msg.sender: Use require(msg.sender == owner(), "not owner"); to prevent potential phishing attacks.

Updates

Lead Judging Commences

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

invalid_tx-origin

Lightchaser: Medium-5

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.