Skip to content

Code4rena

Aave Lens contest

Every publicly disclosed report for Aave Lens contest and what kind of bugs they were.

disclosed reports
13
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Aave Lens contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Aave Lens contest chose to make public.

Race condition

Profile creation can be frontrun

The profile creation function in the LensHub contract can be frontrun by other whitelisted profile creators, who can observe pending transactions and claim a desired handle first. An attacker could then demand a ransom from the original creator for that handle.

Aave Lens contest

Medium
Business logic

Cashback on referral

The fee collect modules allow a user to specify any profile as the referrer, so a collector can use a second profile they control to receive part of the fee back. This lets users effectively get a discount on collection fees, leaking value from the protocol.

Aave Lens contest

Medium
Access control

Imprecise management of users’ allowance allows the admin of the upgradeable proxy contract to rug users

The FeeFollowModule contract allows the Hub to transfer funds from any address specified as the follower, and because the Hub is an upgradeable proxy, a malicious admin could upgrade it to a contract that calls processFollow with an arbitrary follower, draining that user's approved allowance. An attacker with admin access could steal up to the allowance limit from any user who has approved the module.

Aave Lens contest

Medium
Race condition

Reentrancy allows commenter to overwrite own comments

A reentrancy bug in the comment creation function allows a malicious reference module to overwrite the content of a comment after it is created, so the emitted event shows one content URI while the stored comment has another. An attacker could use this to make their profile link to malicious content, tricking light clients and other users.

Aave Lens contest

Medium
Business logic

Zero collection module can be whitelisted and set to a post, which will then revert all collects and mirrors with `PublicationDoesNotExist

If the zero address is whitelisted as a collect module and then set on a post, all collect and mirror attempts revert with PublicationDoesNotExist, and getPubType incorrectly returns Mirror. An attacker with governance privileges could cause this, but the report notes it requires a bad actor in governance.

Aave Lens contest

Medium
Business logic

It’s possible to follow deleted profiles

The follow function checked only whether a handle existed, not whether it belonged to the intended profile. An attacker could follow a deleted profile if a new profile reused the same handle.

Aave Lens contest

Medium
Business logic

Missing whenNotPaused

The LensHub contract's transfer function lacks the whenNotPaused modifier that other external functions have, so governance cannot stop profile NFT transfers during an emergency. An attacker could continue transferring profile NFTs even when the protocol is paused.

Aave Lens contest

Medium
Access control

Approvals not cleared when transferring profile

The ApprovalFollowModule contract stores approvals keyed by the current owner and profile ID, but does not clear them when the profile NFT is transferred. If the NFT is later transferred back to the original owner, old approvals remain active, potentially allowing previous approved addresses to act unexpectedly.

Aave Lens contest

Medium
Business logic

Ineffective Whitelist

A whitelisted profile creator can mint unlimited profiles and transfer the NFTs to other users, bypassing the intended restriction that only whitelisted accounts should create profiles. This makes the whitelist ineffective for limiting profile creation.

Aave Lens contest

Medium
Business logic

Name squatting

Creating profiles through the protocol's createProfile function costs nothing, so a whitelisted profile creator can register many desirable handles without needing them, intending to resell them later. This prevents legitimate high-profile users from obtaining their preferred handles.

Aave Lens contest

Medium