Submitted by The_Kakers, also found by mrudenko, alexfilippov314, xuwinnie, xAriextz, Draiakoo, Stryder, 0xblackskull, VAD37, rotcivegaf, BugzyVonBuggernaut, and zach
Artist signatures can be forged, making it possible to sign any message, while proving that it was signed by any address.
This can be done to impersonate any address from any artist, breaking a core protocol functionality, and losing users trust. The signature cant be deleted by anyone, nor the artist address, once the collection is signed.
This also breaks one of the main invariants of the protocol:
Evaluated as Medium since it breaks a core contract functionality, and a main invariant, regardless of trusted roles. As any collection admin can impersonate any legit address, which should be consider a way to escalate their authority beyond their role as mentioned on the Access Control and Permissions Attack Ideas.
setCollectionData() allows to set the artist address when the current collectionTotalSupply == 0:
The problem is that it doesnt check that the param collectionTotalSupply passed is != 0. Meaning that the function can be executed multiple times to change the artist address, as long as the total supply is zero:
So, it can be called first to set a fake artist address to call artistSignature() to sign the collection:
And then call setCollectionData() again to set the legit artist address.
Once the signature is set, it cant be changed, nor the artist address, as it will always fall under the else clause:
The following coded POC shows how it can be done.
One way to prevent this is by checking that the collection total supply is set to a value > 0:
0xsomeone (judge) commented:
a2rocket (NextGen) disputed and commented:
MrPotatoMagic (warden) commented:
0xsomeone (judge) commented:
Note: For full discussion, see here.
