NFTBridge
60,000 USDC
View results
Submission Details
Severity: high
Valid

can't delete whitelisted collection on starknet

Github Link

https://github.com/Cyfrin/2024-07-ark-project/blob/main/apps/blockchain/starknet/src/bridge.cairo#L515-L540

Summary

When there are more than one whitelisted collections, and you try to disable a collection, the _white_list_collection function won't remove the collection passed into the function except the collection is the self.white_listed_head.read()

Vulnerability Details

collection deletion won't work because the prev pointer is not updated during deletion

Impact

collection deletion won't work

Recommendations

add prev = next; after this line
https://github.com/Cyfrin/2024-07-ark-project/blob/main/apps/blockchain/starknet/src/bridge.cairo#L537

Updates

Lead Judging Commences

n0kto Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-L2-unwhitelist-from-third collection-impossible

Likelyhood: High, owner can only unwhitelist the 2 first collections. Impact: Medium/High, owner has to empty the list to remove any collection, and replace all the new ones.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!