TokenBalance limit could be bypassed by deploying TokenManager
A compromised chain could deploy a token manager for a fake token on another chain, creating an untracked balance that allows bridging an unlimited amount to the compromised chain and then to the original chain, minting tokens beyond the tracked balance. This undermines the hub's purpose of limiting damage from a chain compromise.
Submitted by 0x007
If a chain is compromised, it can not transfer beyond its balance. However, there’s a clever way to increase its balance arbitrarily.
A compromised chain can deploy token manager to a token controlled by the attacker on a different chain (or in the future, deploy ITS with their minter address). The balance on that chain would be untracked and the attacker can bridge an unlimited amount to the compromised chain to increase its balance. This is very severe because the main purpose of the hub and audit is to reduce damage to the wider ecosystem when a chain is compromised.
Proof of Concept
- There are 3 chains: Ethereum, BNB and WoofChain.
TokenAis an ITS on Ethereum and WoofChain, but not on BNB.TokenAbalance on Ethereum is Untracked cause it is the original.TokenAbalance on WoofChain is 1,000.- WoofChain is compromised.
- We can’t bridge more than the 1,000 balance.
So the goal is to create an untracked balance that we can bridge from. We don’t want Ethereum, cause we would have to buy and own the real tokens. So instead:
- Deploy FAKE Token on BNB. We can create
UINT256_MAXtotally owned by us. - Deploy token manager from WoofChain to BNB with the token address set to the FAKE token.
TokenAbalance on BNB is now Untracked.- Transfer a billion
TokenAfrom BNB to WoofChain (FAKE token would be burnt/locked). TokenAbalance on WoofChain is now1,000,000,1000.- Transfer the billion
TokenAto Ethereum. - The hub confirms that it is less than the balance.
- Ethereum mints the bridged billion
TokenA.
In fact, transferring to WoofChain to increase the tracked balance is unnecessary. We could have bridged from BNB to the original chain —Ethereum— if there’s an ITS connection between them. According to the “Publicly Known Issues” section of README, the hub would be updated to not track balance when a minter is specified. This would enable the bug in a different function because the attacker could specify their address as the minter.
Examples of a compromise that could happen include:
- Bad precompiles or revert handling: Godwoken, evmos
- Invalid transactions: frontier
- Consensus or malicious validator: NEAR
- Compiler bugs: vyper
- Event spoofing
- Contract compromise: e.g., admin key, take over, bug
- Amplifier/routing architecture compromise: External Gateway, Gateway for X on Axelar, Prover, Verifier, Relayer
Recommended Mitigation Steps
Token hub should store the original chain of each ITS tokenId and allow token or manager deployment from the original chain only. This would limit the access of remote chains to transfers.
Assessed type
Access Control
milapsheth (Axelar) confirmed and commented:
The report is valid, although we consider the severity to be Medium since the issue can’t be exploited on it’s own and requires a severe chain compromise to occur (since ITS by itself doesn’t allow deploying token manager for trustless factory tokens). While ITS hub isn’t meant to protect against all possible scenarios, it could handle this case by storing the original chain and restricting deployments from the origin chain as the report suggests. This is the same issue discussed in #43 and #77, although the exploit here is different.
The Warden specifies a potential scenario in which a blockchain compromise could affect a balance greater than the original one that was bridged to it.
I do not believe that a blockchain compromise is meant to reduce the severity of the vulnerability as the ITS system is meant to integrate with as many chains as possible in a “permissionless” manner. As tokens can be directly affected by the described vulnerability, I believe a high-risk severity rating is appropriate. To note, the root cause is different from #77 and #43 and thus, merits its own submission.
milapsheth (Axelar) commented:
@0xsomeone - Our reply here is relevant for this report, as well. ITS Hub is meant to limit damage in certain scenarios for chains connected to Axelar that have ITS deployed. But chains added by Axelar governance have to still meet a quality and security standard. Furthermore, ITS Hub explicitly whitelists ITS addresses by chain that it trusts. A compromised chain is inherently risky to all connected chains and apps, so ITS hub doesn’t allow arbitrary permissionless connections. So without a concrete exploit that can steal user funds, we consider this report to be a Medium severity issue.
0xsomeone (judge) decreased severity to Medium and commented:
@milapsheth - After reviewing the codebase’s documentation, I am inclined to agree that a blockchain compromise is considered a low-likelihood event rendering this submission to be of medium severity.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the token hub does not record the original chain of each token and allows token manager deployment from any chain, so a compromised chain can create an untracked balance for a fake token.
Impact
A compromised chain could mint an arbitrary amount of tokens on the original chain, bypassing the balance limit, though the report notes this requires a severe chain compromise and the project considers it medium severity.
What the attacker needed
A compromised chain; ability to deploy a token manager from the compromised chain; a token not yet deployed on the target chain
How it was found
- Deploy a fake token on a chain where the real token does not exist.
- From the compromised chain, deploy a token manager for the fake token on that chain.
- Transfer a large amount of the fake token from that chain to the compromised chain, increasing its tracked balance.
- Transfer the inflated balance from the compromised chain to the original chain.
- The hub confirms the amount is less than the balance and mints the tokens on the original chain.
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 report has not been written yet. The Original tab links to the source.
A bridge lets tokens move between blockchains. This report shows that if one blockchain is taken over, the attacker can trick the bridge into thinking a fake token on another chain is real, then move a huge amount of that fake token to the original chain, where it gets minted as real tokens. The bridge was supposed to limit how much a compromised chain could move, but this trick bypasses that limit.
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.