Caller supplied `ControlTower` lets anyone be the migrator
The migration and reentrancy functions check the caller's migrator role against a caller-supplied ControlTower contract instead of the market's trusted stored one. An attacker can pass a fake ControlTower that always approves them, then use migrateFrom to move a victim's collateral to an attacker-controlled receiver and migrateTo to push debt onto other accounts.
0xAdwa Follow with 0xImmortan, 0xRaz and 47 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-08-usg-tangent-judging/issues/61
Found by
0xAdwa, 0xImmortan, 0xRaz, 0xRstStn, 0xc0ffEE, 0xd4ps, 0xodus, 0xxAristos, 7, Artur, BADROBINX, Cybrid, HeckerTrieuTien, InquisitorScythe, JeRRy0422, Obsidian, Orhukl, Oxsadeeq, Pexy, Ratt13snak3, Sneks, Synthrax, Uddercover, X0sauce, Ziusz, air_0x, axelot, bam0x7, boredpukar, covey0x07, edger, gh0xt, gneiss, greekfreakxyz, illoy_sci, jayjoshix, lucky-gru, maigadoh, makarov, oxelmiguel, prosper, redtrama, sakibcy, sl1, theboiledcorn, tobi0x18, web3made, x15, xKeywordx, yaioxy
Summary
The migration and reentrancy functions verify isPositionMigrator(msg.sender) against a caller-provided IControlTower parameter instead of the market’s trusted controlTower state. An attacker can pass a fake ControlTower that always returns true, then use migrateFrom/migrateTo to siphon a victim’s collateral to an attacker receiver, shove debt onto others, and grief by toggling the reentrancy lock
Root Cause
The contract delegates the role check to a caller-supplied parameter instead of its own trusted state. In _verifySenderMigrator, the authority being queried is the external argument _controlTower, which the caller controls
// MarketCore.sol
function _verifySenderMigrator(IControlTower _controlTower) internal view {
// @ Untrusted authority: the caller picks _controlTower
require(_controlTower.isPositionMigrator(msg.sender), NotAMigratoor());
}
Entry points then accept that same _controlTower and pass it through
// MarketExternalActions.sol (simplified)
function migrateFrom(
IControlTower _controlTower, // @ user-supplied
address account,
uint256 collatToRemove,
uint256 debtToRemove,
uint256 debtToRepay,
address receiver
) external /* nonReentrant etc */ {
_verifySenderMigrator(_controlTower); // @ checks the untrusted param
// ... proceeds with collateral/debt moves, eventually sending to `receiver`
}
function migrateTo(
IControlTower _controlTower, // @ user-supplied
address account,
uint256 collatToAdd,
uint256 debtToAdd
) external {
_verifySenderMigrator(_controlTower); // @ same issue
// ... mutates another account’s position
}
function reeantrancyOn(IControlTower _controlTower) external {
_verifySenderMigrator(_controlTower); // @ lets attacker flip lock
// ... set lock = true
}
Conceptually, the market already has a trusted authority in storage
IControlTower public controlTower; // @ canonical, trusted authority for roles
But the checks ignore it and instead trust whatever the external caller passes in.
Internal Pre-conditions
External Pre-conditions
Attack Path
- Attacker deploys
FakeControlTowerimplementingisPositionMigrator(address) → true. - Calls
market.migrateFrom(fakeCT, victim, collatToRemove, debtToRemove, debtToRepay, receiver=attacker). - Function proceeds, reducing victim’s collateral (and optionally reshaping debt), ultimately transferring collateral out via the post‑hooks to receiver.
- Optionally call
migrateTo(fakeCT, anotherVictim, collatToAdd, debtToAdd)to push debt onto another account.
Impact
Any caller can masquerade as an authorized migrator by passing a fake IControlTower that always approves them. That lets the attacker invoke migrateFrom to siphon a victim’s collateral to an attacker-controlled receiver, potentially draining positions entirely in a single transaction.
Using migrateTo, the attacker can shove arbitrary debt onto other accounts, forcing liquidations, ruining health factors, and creating broad griefing/insolvency risk for the market. They can also flip the market’s reentrancy lock via reeantrancyOn/Off to disrupt other users’ actions during execution, enabling denial-of-service style griefing.
There are no meaningful preconditions beyond deploying a permissive ControlTower and calling the functions, so the blast radius includes any account with collateral on any affected market.
PoC
No response
Mitigation
No response
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/Tangent-labs/tangent-contracts/commit/925e46fafbd3465feff24bfc4badfb64f3fc6a42
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
The contract delegates the role check to a caller-supplied parameter instead of its own trusted state.
Impact
Any caller can masquerade as an authorized migrator, siphon a victim's collateral to an attacker-controlled receiver, shove arbitrary debt onto other accounts, and flip the reentrancy lock to disrupt other users.
What the attacker needed
Ability to deploy a contract; victim has collateral on the market
The fix
The protocol team fixed this issue in a pull request.
How it was found
- Deploy a fake ControlTower contract whose isPositionMigrator function always returns true.
- Call migrateFrom with the fake ControlTower, a victim account, amounts to remove, and the attacker as receiver.
- The function proceeds, reducing the victim's collateral and transferring it out to the attacker.
- Optionally call migrateTo with the fake ControlTower to add debt to another account.
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 smart contract has a list of trusted helpers called migrators. The contract is supposed to ask its own stored list whether someone is a migrator, but instead it asks a list that the caller hands in. An attacker can hand in a fake list that says yes to everyone, then use the migrator-only functions to move other people's collateral or debt.
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.