Signature Reuse Risk
In this page, we cover the threat of reusing the paymaster’s signature.
Cross-chain signature replay attack possibility
src/vulnerableVerifyingPaymaster.sol
function getHash(UserOperation calldata userOp)
public view returns (bytes32) { // @audit change to view
//can't use userOp.hash(), since it contains also the paymasterAndData itself.
return keccak256(abi.encode(
userOp.getSender(),
userOp.nonce,
keccak256(userOp.initCode),
keccak256(userOp.callData),
userOp.callGasLimit,
userOp.verificationGasLimit,
userOp.preVerificationGas,
userOp.maxFeePerGas,
userOp.maxPriorityFeePerGas
));
}Signature without Nonce.
Last updated