Juicebox V2 contest - Lambda's results

The decentralized fundraising and treasury protocol.

General Information

Platform: Code4rena

Start Date: 01/07/2022

Pot Size: $75,000 USDC

Total HM: 17

Participants: 105

Period: 7 days

Judge: Jack the Pug

Total Solo HM: 5

Id: 143

League: ETH

Juicebox

Findings Distribution

Researcher Performance

Rank: 5/105

Findings: 3

Award: $4,428.88

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: philogy

Also found by: Lambda, berndartmueller

Labels

bug
documentation
duplicate
3 (High Risk)
sponsor acknowledged
valid

Awards

3859.255 USDC - $3,859.26

External Links

Lines of code

https://github.com/jbx-protocol/juice-contracts-v2-code4rena/blob/c363abb67302314c2e061a01f76eb5e5dce2c935/contracts/JBTokenStore.sol#L267

Vulnerability details

Impact

In JBTokenStore.changeFor, there is the possiblity to change the owner of the old token, but it is neither checked nor automatically enforced (e.g., with an approval of the old owner) that the new token is owned by the token store. If this is not the case, the consequences are severe. Minting and burning will revert (as these functions are restricted to the owner), meaning that the mintFor and burnFrom functions also will revert.

Either check that the token store is the owner or automatically initiate an ownership transfer (where an approval of the previous owner is necessary).

#0 - mejango

2022-07-12T17:31:44Z

dup of #104

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter