The setbidtobuy function in a CosmWasm NFT marketplace contract never checks the sell.islisted flag, so a token the seller has delisted can still be bought when auto-approve is enabled. An attacker could therefore acquire a token the seller no longer intended to sell.
When a seller lists a token for sale with auto-approve enabled, a bidder is granted approval to transfer the token. Cancelling the bid refunds the bidder but leaves that approval in place, so the bidder can then transfer the token to themselves without paying the seller.
The smart contract uses a 64-bit unsigned integer for rental prices, which limits the maximum price to about 18 tokens when the token has 18 decimals. This prevents landlords from setting higher rental prices with such tokens.
The cancellation functions loop over an owner-controlled list of cancellation items, so a large list can make the transaction run out of gas. A malicious NFT owner could set a very long list and thereby stop a reservation from being cancelled.
The smart contract allows renters to make reservations for dates outside the property's declared available period because the reservation functions only check the minimum stay duration. An attacker could book a property for dates the owner did not intend to make available.
The transfer_nft function in a smart contract does not verify that a buyer's bid matches the seller's listed price, and it allows the caller to specify any recipient. A malicious buyer can therefore transfer a listed NFT to an address with no bid, resulting in zero payment to the seller, and then cancel their own bid for a full refund.
The withdrawtolandlord function uses a u64 for the token amount, which can only hold about 18 tokens with 18 decimals. If a landlord's owed amount exceeds this, they cannot withdraw in one call and must split into many transactions.
The contract stores short-term and long-term rentals in the same list but does not check the rental type when cancelling, so a short-term reservation can be cancelled using the long-term cancellation function. This refunds the deposit in the long-term rental's token, which may be more valuable, allowing an attacker to steal funds from the contract.
The long-term reservation function in a smart contract lets anyone book a rental period without paying any deposit, and the booked period is immediately marked unavailable. An attacker could use many addresses to block all slots for a property, preventing genuine renters from booking.
The long-term rental cancellation function marks a reservation as cancelled but never refunds the tenant, and the cancellation percentage set by the token owner is ignored. Instead, the protocol fee is deducted later, so the tenant receives a different amount than the landlord intended.
A homeowner can withdraw part of a tenant's long-term rental deposit and then reject the active reservation, refunding only the reduced deposit. This lets the homeowner keep the withdrawn funds while removing the tenant.
The setlistforsell function allows a seller to change the payment token (denom) even when there are active bids. An attacker can bid with a low-value token, change the denom to a high-value token, then cancel the bid to receive a refund in the high-value token, draining funds from the contract.
The mint function accepts an owner parameter but sets the token's owner to the caller's address instead. This means a user cannot mint a token for another address, as the caller always becomes the owner.
When a seller enables auto-approve, a bidder gains approval to transfer the token. The bidder can use the send_nft function, which lacks payment settlement logic, to transfer the token to their own contract without paying, then cancel the bid for a refund.
The burn function deletes all token data, including active rental records and deposits, without checking for active rentals. A property owner can burn their token while rentals are active, causing renters' deposited funds to become stuck in the contract.
The token_uri field in the mint function is arbitrary and user-supplied, allowing a malicious user to set it to a fake URL or JSON that impersonates a higher-value rental property. This could phish users into renting or buying the wrong property if the frontend displays the metadata without sanitisation.
When an NFT is listed for sale with auto-approval enabled, anyone who places a bid is automatically approved as a spender on that NFT. Because an approved address can call the long-term rental withdrawal function and choose the recipient, an attacker can withdraw the rental funds to themselves.
The check that prevents editing a short-term rental listing only verifies that the last rental's check-out time has passed, not that all rentals are finalised. A malicious landlord can change the payment token after a rental ends but before finalisation, causing the contract to pay out in a more valuable token and draining other users' deposits.
CE
Coded Estate Invitational
High
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.