Weather Witness

First Flight #40
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: high
Likelihood: medium
Invalid

Dangerous tx.origin Usage in finalizeMint

Root + Impact

The contract uses tx.origin instead of msg.sender in finalizeMint(), allowing phishing attacks through proxy contracts.

Description

  • tx.origin returns the original EOA that initiated the transaction.

  • Any dApp or attacker contract can hijack finalization with a proxy mint.

function fulfillRequest(bytes memory response, bytes memory err) external {
...
finalizeMint(tx.origin);
}

Risk

Likelihood:

  • Users interacting with malicious dApps can have their NFTs minted unknowingly.

Impact:

  • Phishing + unintended NFT minting

  • Undermines access control

Proof of Concept

Called via phishing proxy, contract sees tx.origin as the victim.

// Attacker contract
function proxyFinalize(address nft) public {
// tx.origin is victim, msg.sender is attacker
WeatherNft(nft).fulfillRequest(bytes("đŸŒŠī¸"), "");
}

Recommended Mitigation

Replace tx.origin with msg.sender, and pass explicitly controlled mint recipient:

function fulfillRequest(bytes memory response, bytes memory err) external {
...
finalizeMint(msg.sender); // or store the request originator safely
}
​
Updates

Appeal created

bube Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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