Skip to content
Business logic Audit finding Intermediate

Locked splits can be updated

The contract's check for whether a new split matches an existing locked split did not compare the preferClaimed and preferAddToBalance boolean fields. An attacker could overwrite these fields on a locked split by submitting the same split with different boolean values, violating the intended immutability of locked splits.

berndartmueller Follow

Originally disclosed on Code4rena

Submitted by berndartmueller

The check if the newly provided project splits contain the currently locked splits does not check the JBSplit struct properties preferClaimed and preferAddToBalance.

According to the docs in JBSplit.sol, “…if the split should be unchangeable until the specified time, with the exception of extending the locked period.”, locked sets are unchangeable.

However, locked sets with either preferClaimed or preferAddToBalance set to true can have their bool values overwritten by supplying the same split just with different bool values.

Proof of Concept

JBSplitsStore.sol#L213-L220

The check for sameness does not check the equality of the struct properties preferClaimed and preferAddToBalance.

Please see warden’s original report for full PoC and Mitigation details.

Recommended Mitigation Steps

Add two additional sameness checks for preferClaimed and preferAddToBalance:

mejango (Juicebox) confirmed

mejango (Juicebox) resolved:

PR with fix: PR #1

berndartmueller (warden) reviewed mitigation:

Two additional sameness checks for the split properties preferClaimed and preferAddToBalance have been added.


The original report as published on Code4rena, by berndartmueller. 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 sameness check for locked splits omitted the preferClaimed and preferAddToBalance fields, allowing them to be altered.

Impact

An attacker could change the preferClaimed and preferAddToBalance settings of a locked split, potentially affecting how funds are distributed or claimed.

What the attacker needed

Locked split with preferClaimed or preferAddToBalance true

The fix

The fix adds two additional sameness checks for preferClaimed and preferAddToBalance.

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 lets projects lock their payment splits so they cannot be changed. The code that checks if a new split is the same as a locked one forgot to compare two settings: whether the recipient prefers to claim tokens or have them added to their balance. So someone could change those two settings even though the split was supposed to be locked.

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.

More by berndartmueller

View all

97 more disclosed reports, best first.

More from Juicebox Buyback Delegate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.