NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of _msgSender() Usage in `StarklaneEscrow` Contract

Vulnerability Details

The StarklaneEscrow contract inherits from the Context contract but does not utilize the _msgSender() function provided by Context to determine the actual sender of the transaction. Instead, it directly uses msg.sender to identify the user interacting with the contract.

/**
@title Contract responsible of escrowing tokens.
*/
contract StarklaneEscrow is Context {

The use of _msgSender() is crucial in scenarios where meta-transactions are involved. Meta-transactions allow users to interact with the blockchain without directly sending transactions, usually through a relayer. In such cases, the original sender of the transaction (i.e., the user) may differ from msg.sender (which would be the relayer). The Context contract provides _msgSender() to correctly identify the original sender even when a relayer is involved.

Impact

By not using _msgSender(), the StarklaneEscrow contract may fail to correctly recognize the actual sender in scenarios involving meta-transactions. This could lead to security issues, as the contract might incorrectly attribute ownership of actions, leading to unauthorized token deposits and withdrawals.

Tools Used

Manual review

Recommendations

Replace all instances of msg.sender with _msgSender() to ensure that the contract correctly identifies the original sender, particularly in scenarios involving meta-transactions.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

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