This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
MohammedRizwan - In OrderBook.sol contract, Use of deprecated draft-EIP712Upgradeable.sol cause security issues #161
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
MohammedRizwan
high
In OrderBook.sol contract, Use of deprecated draft-EIP712Upgradeable.sol cause security issues
Summary
In OrderBook.sol contract, Use of deprecated draft-EIP712Upgradeable.sol cause security issues
Vulnerability Detail
Impact
In OrderBook.sol,
The contract has used deprecated draft-EIP712Upgradeable.sol contract which is from openzeppelin. The contracts has used openzeppelin v4.5.0 which is too old.
Openzeppelin has deprecated draft-EIP712Upgradeable.sol contract in v4.8.0. It says,
Reference link- https://github.com/OpenZeppelin/openzeppelin-contracts/releases
After openzeppelin version- 4.5.0, There were lots of security patches and code optimization happened in EIP712Upgradeable.sol.
Some references as below,
OpenZeppelin/openzeppelin-contracts#3969
V4.9.0 Breaking changes include,
Code Snippet
https://github.com/hubble-exchange/hubble-protocol/blob/d89714101dd3494b132a3e3f9fed9aca4e19aef6/contracts/orderbooks/OrderBook.sol#L6
Tool used
Manual Review
Recommendation
Use openzeppelin EIP712Upgradeable.sol contract with latest version. Contract link
The text was updated successfully, but these errors were encountered: