Blockchain Network is Secured! But not the apps and their Integrations
The booking API did not bind the transaction hash to the number of tickets, so an attacker could book many tickets with a single payment. The refund function then allowed the attacker to cancel those tickets and receive more ETH than they paid, draining the admin wallet.
Published on wesecureapp.com
During the security assessment for a blockchain-based web application, it was observed that some of the functions were vulnerable to unauthenticated ETH transfer from an admin wallet to the attacker’s wallet. The web application was a booking application where a user can book tickets and pay with a crypto token.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the backend did not validate that the transaction hash corresponded to the correct number of tickets, and the refund logic trusted the ticket count without re-checking the original payment.
Impact
An attacker could book many tickets with one payment and then cancel them to receive a refund larger than the amount paid, potentially draining up to 10 ETH from the admin's wallet.
What the attacker needed
A user account; a MetaMask wallet with some ETH; ability to intercept and modify API requests
How it was found
- Initiate a ticket booking and pay 0.1 ETH via MetaMask.
- The app confirms the payment with a POST request containing transaction_hash and total_tickets.
- Tamper the total_tickets parameter to book many tickets (e.g., 100) for the same 0.1 ETH payment.
- Cancel the booked tickets via the cancel_ticket endpoint.
- The backend validates the ticket IDs and initiates a refund to the attacker's wallet.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you pay for tickets with cryptocurrency, the app should check that the payment matches the number of tickets you are buying. Here, it only checked that a payment happened, not how many tickets it was for. So someone could pay for one ticket but claim many, then cancel them all for a bigger refund.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.