Severity depends on reachable impact and deployment context. Listed tools are review aids; their applicability depends on language, version and configuration.
tx.origin is the sender at the top of the EVM call chain; msg.sender is the immediate caller of the current frame. The authentication flaw is not that an attacker can spoof tx.origin. It is that an authorized account can start a transaction which passes through an untrusted contract, while a downstream victim still sees the authorized account as the origin.
Assume a wallet protects withdraw with require(tx.origin == owner). The owner interacts with an attacker-controlled contract, perhaps through an apparently unrelated action. That contract calls the wallet. Inside the wallet, msg.sender is the attacker contract but tx.origin is still the owner, so the origin check passes. The wallet has confused proof that the owner initiated the overall transaction with proof that the owner directly authorized this particular call.
Solidity's security guidance therefore says never to use tx.origin for authorization. Replacing it with msg.sender makes the immediate caller part of the authorization decision. That does not mean all contract callers should be banned: multisigs, smart accounts, routers, and relayers are contracts. They should be supported through explicit roles, validated signatures, or a deliberately designed forwarding standard.
Search every use of tx.origin, including inline assembly and inherited modifiers. Classify logging or telemetry separately from any branch that controls funds, roles, configuration, signatures, or execution. Follow internal helpers to ensure an origin-based boolean is not computed in one place and enforced elsewhere.
For each authorization path, write a test with three actors: the authorized account, an intermediate attacker contract, and the victim. Have the authorized account call the intermediate contract and make it invoke the protected function. The attempt must fail unless that intermediate caller is itself explicitly authorized. Also test intended multisig and relayer paths so the fix preserves composition.
Firepan can flag tx.origin data flow into authorization decisions in a submitted repository and commit. It cannot establish user intent from code alone or continuously monitor every deployed call chain.
msg.sender or a reviewed role modifier.require(msg.sender == tx.origin) is not a general repair. It excludes contract wallets and does not express who may perform the action. Likewise, tx.origin can remain useful for diagnostics, but using it in a security decision recreates the confused-deputy boundary.
Firepan
Run a free scan — results in minutes, no credit card required.
Run Free Scan →Assess smart contract admin powers, upgrade authority, key custody, delays, caps, and the limits of source-only centralization analysis.
Review smart contract liveness failures caused by gas growth, external-call reverts, griefing, and unrecoverable state.
Understand first-depositor and donation attacks against tokenized vaults, rounding conditions, tests, and mitigation tradeoffs.
Review accounting assumptions for fee-on-transfer, rebasing, and other non-standard ERC-20 tokens, with test and mitigation guidance.
Understand transaction-ordering risk, sandwich attacks, the conditions that make them profitable, and practical review and mitigation techniques.