Closed code423n4 closed 1 year ago
gzeon-c4 marked the issue as primary issue
livingrockrises marked the issue as sponsor confirmed
FYI you should look for the "MARKED DUPLICATES" section on the bottom, not sure why you quoting some issue I didn't mark as duplicate of this.
gzeon-c4 marked the issue as satisfactory
gzeon-c4 marked issue #36 as primary and marked this issue as a duplicate of 36
Lines of code
https://github.com/code-423n4/2023-01-biconomy/blob/53c8c3823175aeb26dee5529eeefa81240a406ba/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L194 https://github.com/code-423n4/2023-01-biconomy/blob/53c8c3823175aeb26dee5529eeefa81240a406ba/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L212 https://github.com/code-423n4/2023-01-biconomy/blob/53c8c3823175aeb26dee5529eeefa81240a406ba/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L218
Vulnerability details
Description
The
execTransaction
function includes an input parameter calledbatchId
that is used to determine the nonce which is included in the data signed by the owner. However,batchId
is not part of the signed data. This allows any third party to replay a signed transaction using a differentbatchId
value, as the nonce values will be the same.Impact
Possibility of replay of any transaction for which there exists a
batchId
with corresponding nonce value.Recommended Mitigation Steps
Add
batchId
intoTransaction
struct and include its value into the tx hash preimage inencodeTransactionData
function.