Submitted by nnez, also found by nnez
Malicious actor can exploit this vulnerability to steal other users deposited token from the contract.
The landlord (property owner) invokes finalizeshorttermrental on a specific rental to settle the payment. If the rental is canceled after approval or has concluded (reached check-out time), the contract sends the payment to the token owners address.
The bug stems from an oversight in the function that checks whether a property can be re-listed for short-term rental. 
The finalizeshorttermrental function uses the denom (token type) stored in the shortterm_rental struct to determine which token to use for payment:
The setlistforshorttermrental function, which can change this denom, is supposed to be callable only when there are no active rentals. This is checked by the check_can_edit_short function:
However, this function only checks if the current time exceeds the last rentals check-out time. It doesnt verify whether all rentals have been finalized or if there are any pending payments.
This oversight allows a malicious landlord to change the denom after a rental period has ended but before finalization, potentially getting payment in a more valuable token than originally configured.
The attack scenario could unfold as follows:
Attacker starts with two accounts, one as landlord and one as renter.
This exploit allows the attacker to artificially inflate the value of their rental payment, draining funds from the contract that were deposited by other users.
The following test demonstrates the described scenario:
Boilerplate for PoC here.
Only allow editing when there is no rental.
Invalid Validation
blockchainstar12 (Coded Estate) confirmed
