NFT online art gallery Foundation faces major risk, fears all NFT issuance could be destroyed
DeFiLlama developer 0xngmi posted on 6/21 stating that the popular NFT online gallery Foundation has a smart contract vulnerability that resulted in the loss of all NFT on-chain data.
Table of Contents
Foundation Risk: Could Contracts "Self-Destruct"?
The NFT contracts of Foundation use the forwarder proxy pattern, which is typically used to save on deployment Gas Fees. This means that all collectibles will call a single contract and use its code. 0xngmi stated that while this is usually not a problem, in the case of Foundation, this contract could be "self-destructed" by Foundation.
Foundation Risk: Why is This Happening?
Foundation's collectibles have a feature that allows creators to destroy them when they don't have an NFT. This was designed for collectibles but also applies to contract implementation. This means that if there is no NFT in the contract implementation, its creator can destroy it.
However, Foundation's team, as the owners of the contract, can also destroy it. If they do so, all collectible contracts become invalid because they will only call a destroyed contract to obtain non-existent code.
The Foundation team has the ability to effectively delete all collectibles minted on their platform. The ownership of the contract is currently managed by six multi-signature private keys, requiring only two key authorizations to execute.
Foundation Risk: How to Address It?
0xngmi suggested a possible solution is to mint an NFT in the contract implementation and then transfer it to a burn address. This would eliminate the contract's ability to self-destruct because it wouldn't make the NFT in the contract zero.
However, 0xngmi disclosed this issue and proposed a fix to Foundation about six months ago, but it remains unresolved.
Foundation Risk: Why Should You Care?
0xngmi mentioned that if the contract's keys are leaked, attackers could ransom all NFTs or destroy them.
0xngmi emphasized that all collectors who own Foundation works believe their NFTs on the blockchain are immutable and cannot be tampered with, at most only the metadata, which points to the information of the NFT image file, is at risk. However, the reality is far from that, as all NFTs on Foundation could be destroyed with just two transactions away.
0xngmi also provided a proof of concept repository that simulates attacks and verifies that it would render all NFTs useless.
Here's a repo with proof of concept for the exploit, simulating the attack and verifying that it would brick all NFTs: https://t.co/uJQVw0DSwR
Disclosure timelines and a longer explanation of the issue are also on the repo
— 0xngmi (@0xngmi) June 21, 2023
Related
- Magic Eden is set to integrate multiple cross-chain ecosystems and tokens by the end of the year, with the founder advocating the MAGIC principle.
- STEPN collaborates with Adidas to release co-branded NFTs, promoting a healthier lifestyle through gamified earning opportunities.
- Binance will discontinue Bitcoin NFT trading and deposit services and will not support Runestone.