Governor can rug pull the escrow
The governor of the BridgeEscrow contract can approve any address to spend all GRT tokens held in escrow, allowing the governor to steal all escrowed funds. This centralisation risk means users must trust the governor not to take the tokens.
Submitted by d3e4, also found by catchup, cccz, and joestakey
Governor can rug pull all GRT held by BridgeEscrow, which is a severe undermining of decentralization.
Proof of Concept
The governor can approve an arbitrary address to spend any amount from BridgeEscrow, so they can steal all escrowed tokens. Even if the governor is well intended, the contract can still be called out which would degrade the reputation of the protocol (e.g. see here: https://twitter.com/RugDocIO/status/1411732108029181960). This is especially an issue as the escrowed tokens are never burnt, so the users would need to trust the governor perpetually (not about stealing their L2 tokens, but about not taking a massive amount of L1 tokens for free for themselves).
This seems an unnecessary power granted to the governor and turns a decentralized bridge into a needless bottleneck of centralization.
Recommended Mitigation Steps
Restrict access to approveAll() to the “bridge that manages the GRT funds held by the escrow”. Or, similarly to how finalizeInboundTransfer in the gateways is restricted to its respective counterpart, only allow spending via other protocol functions.
0xean (judge) commented [via issue #40]:
This is the intended design to allow for multiple bridges in the future. Going to leave open for sponsor review, but may decide to close as invalid.
pcarranzav (The Graph) disputed and commented [via issue #40]:
Yes, this is intentional to allow multiple bridges but also to allow for recovery of the funds in case of a critical issue in Arbitrum.
Note that the Governor is not a regular EOA, but a Gnosis Safe managed by The Graph Council; this account is already able to control many protocol parameters, including adding minters to the GRT contract, so adding this control over the escrow does not change the trust assumption significantly imo.
0xean (judge) commented [via issue #40]:
@pcarranzav - totally understand that. I personally would happily close this issue as invalid, but Code4rena seems to have a pattern of awarding these as Medium to ensure that users are aware of the risk, even as low as it may be.
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 approveAll function is callable by the governor, granting arbitrary spending approval over all escrowed tokens.
Impact
The governor could steal all escrowed GRT tokens, undermining decentralisation and requiring perpetual trust in the governor.
What the attacker needed
Governor is malicious or compromised
The fix
Restrict access to approveAll() to the bridge that manages the GRT funds, or only allow spending via other protocol functions.
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 called BridgeEscrow holds tokens for a bridge. The person or group in charge (the governor) can give any address permission to take all those tokens. That means the governor could steal all the tokens, which is dangerous because users have to trust them completely.
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.