CoreCollection.initialize()
Can Be Called Multiple Times
#36
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-03-joyn/blob/c9297ccd925ebb2c44dbc6eaa3effd8db5d2368a/core-contracts/contracts/CoreCollection.sol#L78-L97
Vulnerability details
Impact
The function
CoreCollection.initialize()
may be called multiple times. This is a function only intended to be called once during startup.As a result the owner can change variables such as
mintFee
(which could be used to catch unaware users to transfer more tokens than they intended during a mintTokencall),
_maxSupply,
payableToken,
isForSaleand
splitFactorymay be changed in addition to the
_name,
_symboland
BaseUri`.Proof of Concept
There are no restrictions to this function being called multiple times.
Recommended Mitigation Steps
This issue may be mitigated by calling
require(!initialized);
at the beginning ofinitialize()
.The text was updated successfully, but these errors were encountered: