Submitted by kuprum, also found by MrPotatoMagic, Rhaydden, hail_the_lord, Gosho, inh3l, and DigiSafe
The pausing mechanism of PhiNFT1155 contract is implemented incorrectly and doesnt work. Users are still able to transfer NFTs in paused state.
Contract PhiNFT1155 inherits from the following parent contracts:
The problem with the above is that inheriting from PausableUpgradeable is not effective in the scope of OZ ERC1155 contracts. As a result, users are able to transfer NFT tokens even when the contract is paused, as the below PoC demonstrates.
Drop this test to PhiFactory.t.sol and execute via forge test --match-test Kuprum:
Foundry
We recommend to inherit from ERC1155PausableUpgradeable instead of PausableUpgradeable; this enforces the paused state on the NFT transfer functions. Apply the following diff to PhiNFT1155.sol:
Library
ZaK3939 (Phi) confirmed via duplicate Issue #61
0xDjango (judge) commented:
Note: For full discussion, see here.
