transferFrom
function is being called with an arbitrary from
address, which could potentially lead to security vulnerabilities.transferFrom
function is being called with an arbitrary from
address, which could potentially lead to security vulnerabilities.In Swan.sol, the function transferFrom has this vulnerability.
SwanAsset(_asset).transferFrom(listing.seller, address(this), 1);
is transferring an asset from listing.seller
to the contract itself (address(this)
).However, the transferFrom
function does not check if the from
address (listing.seller
) is actually the owner of the asset being transferred. This means that if an attacker can manipulate the listing.seller
variable to point to an address that is not the owner of the asset, they could potentially steal the asset.
from
address is indeed the owner of the asset being transferred. This can be done by calling the ownerOf
function on the SwanAsset
contract, like this: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.