changeTokenOf makes it impossible for holders of oldToken to redeem the overflowed assets.
The changeTokenOf function allows the project owner to replace the project's token, which prevents holders of the old token from redeeming overflowed assets. An attacker (the owner) could change the token and lock out existing holders from their redeemable funds.
Submitted by cccz
When the owner calls the changeTokenOf function of the JBController contract, the token corresponding to the current project will be changed, which will make the oldToken holder unable to redeem the overflowing assets.
Proof of Concept
Recommended Mitigation Steps
Consider adding a delay to changeTokenOf, or adding a function to convert oldToken to newToken.
mejango (Juicebox) resolved:
PR with fix: PR #1
berndartmueller (warden) reviewed mitigation:
Once a token is set for a project, it can not be changed anymore.
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 changeTokenOf function replaces the project's token without preserving redemption rights for holders of the previous token.
Impact
Holders of the old token could be unable to redeem overflowed assets after the owner changes the token.
What the attacker needed
Owner calls changeTokenOf; project has overflowed assets
The fix
The project resolved it by making the token unchangeable once set for a project.
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 project has a token that holders can redeem for a share of extra funds (overflow). The owner can switch to a new token, and the old token is no longer recognised for redemption. So people holding the old token lose access to their funds.
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.