Bitswift Unlimited Mint Bug Fix Review
The /bcad/credit endpoint lacked permission checks, allowing any authenticated user to mint unlimited BCAD tokens. An attacker could then trade these tokens in liquidity pools to drain them.
immunefi.com
Published on immunefi.com
It’s easy to forget that smart contracts are not the only place where bugs can reside — the front websites of dApps are also vulnerable and still rewarding for successful bug hunters. Although most of the magic happens on the blockchain, dApps still have websites.
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 endpoint for crediting BCAD tokens was missing an authorization check to ensure the requester had admin privileges.
Impact
An attacker could mint an unlimited amount of BCAD tokens and then trade them in liquidity pools to drain them of value.
What the attacker needed
A valid user account; knowledge of the endpoint
The fix
The vulnerability was fixed by the BitSwift team after being reported.
How it was found
- Review the application's JavaScript files to discover API endpoints.
- Identify that the /bcad/credit endpoint lacks permission checks.
- Send a POST request to the endpoint with a valid JWT and a large amount value.
- Receive a success response despite not being an admin.
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.
A web application had a function to add tokens to a user's account, but it did not check if the user was an administrator. Anyone with a normal account could call this function and create as many tokens as they wanted, then trade them for other valuable tokens.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.