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

No mechanism to randomize `salt`, same `salt` values can be used multiple times.

Vulnerability Details

Salt values are used to randomize hashes while encoding, to prevent from signature replay attacks.
In the Starklane::depositTokens function, salt value is taken as a user input.

function depositTokens(
@> uint256 salt,
address collectionL1,
snaddress ownerL2,
uint256[] calldata ids,
bool useAutoBurn
)
external
payable
{/*logic*/}

link to code

Taking salt as a user input is not secure as, the same value can be set multiple times by different/same user. Which isn't secure as salt value is used to calculate req.hash

req.hash = Protocol.requestHash(salt, collectionL1, ownerL2, ids);

link to code

Impact

Salt value can be reused can allow for malicious operations and compromise security.

Tools Used

Manual review

Recommendations

Use mechanism to randomize salt value or use nonce and increase it every time the function runs.

Updates

Lead Judging Commences

n0kto Lead Judge 12 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.