Even though the soulbound token functionality explicitly prevents transfers between externally owned accounts, a vulnerability exists when the NFT is owned by a contract. In such cases, the contract's administrative logic can be exploited to change the contract's owner, effectively breaking the soulbound property.
The contract enforces the non-transferable nature of the NFT by reverting any transfer attempt using transferFrom and safeTransferFrom. However, if the token is owned by a contract (rather than a standard externally owned account), that contract might have its own methods or administrative privileges that allow the owner of the contract to change state, including the ownership of the contract. As a result, an NFT that is supposed to be soulbound can have its owner changed indirectly through the administrative functions of the contract that holds it.
The core concept of a soulbound token "that the token is permanently bound to a specific identity" can be undermined if the NFT's owner can be changed by the owning contract.
If an NFT is held by a contract with administrative functionality, a potentially malicious or compromised administrator could reassign the contract owning the token, thereby breaking the intended non-transferable (soulbound) characteristic.
In the foundry test file add the following test:
And the following contract:
Manual Code Inspection: Reviewed the NFT contract code to confirm that transfer functions revert, while also examining how contracts owning NFTs might have alternative mechanisms to change ownership.
Foundry: Simulated scenarios where NFTs were minted to and held by contracts with administrative functions to demonstrate potential ownership reassignment.
Implement a check during the minting process that prevents tokens from being minted to contracts, enforcing that only externally owned accounts (EOAs) can receive NFTs.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.