DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: medium
Invalid

EIP712 signatures can be replayed in case of hard fork

Summary

If there is ever a hardfork for Beanstalk then EIP712 domainSeparator value will become invalid. This is because the chainId parameter is cached in constants. This means even after hard fork chainId would remain same which is incorrect and could cause possible replay attacks in 3 different parts of protocol: Tractor, Silo deposit approval, internal token approval.

Vulnerability Details

In "Relevant GitHub Links" section I referred 3 places where protocol uses constant chainId.

This means even after hard fork, EIP712 domain separator value will remain same and point to incorrect chainId.

Impact

After hard fork EIP712 signatures can be replayed on different chain.

Tools Used

Manual Review

Recommendations

Fetch chainId from current block instead of using constant

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Replay attack in case of hard fork - Hardcoded chainId 712

Support

FAQs

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