Skip to content
DoS Audit finding Intermediate

Malicious proposer can DOS bridge withdrawals

A malicious proposer can set the L2 block number of an output proposal to the maximum uint64 value, causing all subsequent output proposals to fail. This prevents users from withdrawing their funds from the bridge.

Ruhum Follow

Originally disclosed on Code4rena

Submitted by Ruhum

https://github.com/initia-labs/OPinit/blob/7da22a78f367cb25960ed9c536500c2754bd5d06/x/ophost/keeper/msg_server.go#L145

https://github.com/initia-labs/OPinit/blob/7da22a78f367cb25960ed9c536500c2754bd5d06/x/ophost/keeper/msg_server.go#L351-L365

Finding description and impact

Anybody can create an L2 and its bridge. They set their own proposer and challenger to handle the output proposals. If the proposer sets the L2 block number of an output proposal to the max value of a uint64, any subsequent output proposal will fail preventing users from withdrawing their funds.

Proof of Concept

In ophost’s ProposeOutput() endpoint the module returns an error if the given L2 block number is smaller than the last proposed output:

		if l2BlockNumber <= lastOutputProposal.L2BlockNumber {
			return nil, types.ErrInvalidL2BlockNumber.Wrapf("last %d, got %d", lastOutputProposal.L2BlockNumber, l2BlockNumber)
		}

By proposing an output with l2BlockNumber = 2^64 - 1 any subsequent call will fail.

A bridge’s admin, proposer, and challenger are not trusted users. Instead, the module allows the L1 governance account (authority), to take over the bridge in case the admin misbehaves, see UpdateProposer(). However, with this attack vector, the governance account cannot reverse the attack or rescue funds unless it deletes the malicious output before it is finalized, see DeleteOutputProposal().

The governance account has to react in a matter of minutes or an hour (depending on the bridge’s configuration).

Recommended mitigation steps

This will always be an issue as long as the L2 block number is an unverified input by the proposer. Maybe you can fully remove it and just depend on the output index that’s tracked by the module.

beer-1 (Initia) acknowledged and commented:

We have logic to delete invalid output proposal during 7 days, and anyone can do challenge.

a_kalout (warden) commented:

This issue requires the proposer to be a malicious entity, which is very unlikely, but in case it is, any output can’t be processed unless it “sits there” for some time; according to the sponsor, it’ll be 7 days. In this period, the challenger should be able to catch and discard that, so the challenger is already there to solve such cases.

As a result, I believe this is a low-severity issue, specifically looking at the mitigation for such scenarios (malicious proposer) is already there.

LSDan (judge) commented:

I think that logic is sound, but if it was not, I would consider this high risk due to the impact and direct nature of the attack. Given the likelihood that the attack happens and is not caught, I agree with the wardens assessment of medium risk.


The original report as published on Code4rena, by Ruhum. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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 L2 block number in output proposals is not validated against a maximum, and the contract requires each new proposal to have a strictly higher block number than the last.

Impact

Users cannot withdraw their funds because no new output proposals can be processed; the governance account can only reverse the attack by deleting the malicious output before it is finalised, which must happen within minutes or an hour depending on the bridge configuration.

What the attacker needed

Attacker is the proposer; bridge has not finalised the malicious output

The fix

The L2 block number should not be an unverified input from the proposer; it could be removed entirely and replaced with the output index tracked by the module.

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 users move funds between two blockchains. The proposer is responsible for submitting records of what happened on the second chain. If the proposer submits a record with an impossibly high block number, the bridge will reject all future records because they are lower. This stops users from withdrawing their money.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Ruhum

View all

55 more disclosed reports, best first.

More from Initia Rollup Modules

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.