PantsirПанцирь
Preparing access
Checking your lab membership...
Created 10 Feb 2026Updated 10 Feb 2026
Vendor Escrow (tx.origin Auth Bypass)
A vendor-invoice escrow contract uses tx.origin for authorization, enabling phishing-based unauthorized payout execution.
solidity280 pts30 min

Overview

A finance team uses an onchain escrow contract to pay approved vendor invoices.

Expected flow:

  • Vendors submit invoices with submitInvoice(uint256 amount).
  • Treasury owner approves them with approveInvoice(uint256 invoiceId).
  • Treasury owner releases funds with releasePayment(uint256 invoiceId).

A security review found that a malicious contract can trigger payouts during a phishing flow, even though only the owner should be able to release payments.

Your task: identify the exact vulnerable line in the escrow contract and explain a secure authorization approach.

Content locked
Join this lab to access the content.
contracts/PhishingRelay.solsol