Malicious relayer could exploit sponsor vaults
The SponsorVault reimburses relayers for fees they pay, but a malicious relayer could relay many transactions at the maximum reimbursable fee and receive both the reimbursement and the fee they paid themselves, draining the vault. The text claims this could leak sponsors' funds, though the team disputed it and the judge downgraded it to medium.
Submitted by 0x52, also found by csanuragjain
Sponsor vaults drained.
Proof of Concept
reimburseRelayerFees uses SponsorVault funds to repay users the fees they pay to relayers. A malicious relayer could create a large number of transactions with the max reimbursed relay fee specified in SponsorVault between chains for which they relay all of them. They would receive back the relay fee from the SponsorVault and they would also get the relay fee they paid themselves.
Recommended Mitigation Steps
I don’t see any way to mitigate this without substantial changes to the functionality of SponsorVault. Teams deploying SponsorVaults should be informed of potential misuse and set reimburse limits accordingly.
LayneHaber (Connext) disputed and commented:
I’m not sure I agree with this as an issue — the relayers are whitelisted (to prevent generalized front-running, and limiting relayers to reliable relay networks).
Usually any dusting systems like the
reimburseRelayerFeesdo not have sybil resistance (unless you connect your socials or something similar), and this is something we will have to advertise to the people who create and fund the vault.NOTE: inspiration for this feature was taken from existing nomad dusting, which has the same potential shortcomings, see here. Generally, chains have been willing to fund these vaults even with these drawbacks. That being said, balance checks could be added to add some slight guardrails!
LayneHaber (Connext) resolved:
0xleastwood (judge) decreased severity to Medium and commented:
I actually agree with the warden here. This type of attack would not be recognisable and could be disguised as general protocol activity. However, users’ funds are not at direct risk, but sponsors’ funds who intentionally give up these funds would be at risk of leaking value. Downgrading to
mediumrisk.
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 reimbursement logic pays relayers without checking whether the relayer is also the fee payer, so a relayer can recover fees it effectively paid to itself.
Impact
Sponsors' funds could be drained through repeated maximum-fee relays, though the team notes relayers are whitelisted and the judge says users' funds are not at direct risk.
What the attacker needed
Be a whitelisted relayer; a funded SponsorVault; cross-chain relay capability
The fix
The team resolved the issue with a code change, and the report recommends informing teams deploying SponsorVaults of potential misuse and setting reimbursement limits.
How it was found
- A relayer sends many cross-chain transactions at the maximum reimbursable relay fee.
- The relayer relays all of those transactions itself.
- The SponsorVault reimburses the relay fee to the relayer.
- The relayer also keeps the relay fee it paid itself, draining vault funds.
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 sponsor vault is a pool of money that pays back relayers, the services that carry transactions between blockchains, for the fees they charge users. The report says a relayer could send lots of transactions at the highest fee the vault will repay, then collect that repayment while also keeping the fee it paid itself, so the vault loses money. The project team argued relayers are whitelisted and this is a known trade-off, and the judge lowered the severity because only sponsor funds, not user funds, are at risk.
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.