code-423n4 / 2021-06-tracer-findings

1 stars 0 forks source link

EIP-712 ChainId hardcoded #114

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

s1m0

Vulnerability details

Impact

The chainId for eip-712 signature is hardcoded in the code, in case of a hard fork the contract would exist on both the chains which make signature replay possible between them.

Recommended Mitigation Steps

The most efficient mitigation is to use a cachedDomainSeparator to not recompute it every time but only check the current block.chainid with a cachedChainId, you can follow the openzeppelin's implementation

raymogg commented 3 years ago

Duplicate of #67