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.
Submitted by hyh
In case when zero collection module be white listed and then zero collection module set to a post (done by different actors), its functionality will be partially broken: every collecting and mirroring of it will be reverted with Errors.PublicationDoesNotExist, while getPubType will return its type as a Mirror.
Setting severity to Medium per ‘function of the protocol or its availability could be impacted’, as either the behavior of rejecting collects/mirrors is desired and to be implemented explicitly, or such a scenario shouldn’t exist in a system, i.e. now zero address absence in white list cannot be guaranteed as its setting is manual and possible
Proof of Concept
Collect module isn’t checked additionally on init, any white listed address can be set:
While zero address also can be white listed:
If zero address is white listed and then set as collectModule for a post, a getPointedIfMirror helper function called on it will revert with Errors.PublicationDoesNotExist:
This way all attempts to collect and mirror this post will also revert:
Also, getContentURI view will fail with the same error:
And getPubType will return Mirror as a publication type:
Recommended Mitigation Steps
Consider prohibiting zero collection module to be white listed.
If rejecting collects/mirrors is desired for a special post type, the corresponding error path can be implemented
Zer0dot (Aave Lens) acknowledged and commented:
This implies governance is a bad actor, and despite it being a side effect, reverting on a zero collect module is acceptable. IMO this is not relevant, though technically the report is valid, we won’t be changing anything.
Zer0dot (Aave Lens) commented:
In consistency with some other comments I made, I wonder if marking this as “low” severity makes more sense. Governance being compromised is within acceptable risk parameters.
0xleastwood (judge) commented:
I think this is inline with C4’s guidelines for a
mediumseverity issue. As such, I’d keep this as is.This is consistent with other governance related issues.
Zer0dot (Aave Lens) commented:
Sounds fair!
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 whitelist allows the zero address to be added as a collect module, and the system does not check for this when setting a module on a post, leading to reverts in helper functions that expect a valid publication.
Impact
Collecting and mirroring the affected post is blocked, and some view functions return errors or incorrect data; the report notes this requires governance to be a bad actor, and the project considers reverting on a zero collect module acceptable.
What the attacker needed
Governance whitelists zero address; governance sets zero address as module
The fix
The report recommends prohibiting the zero address from being whitelisted as a collect module, or explicitly implementing the error path if rejecting collects/mirrors is desired; the project chose not to change anything.
How it was found
- Whitelist the zero address as a collect module.
- Set the zero address as the collect module for a post.
- Attempt to collect or mirror the post, which reverts with PublicationDoesNotExist.
- Call getContentURI, which also fails with the same error.
- Call getPubType, which returns Mirror instead of the correct type.
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 collect module is a smart contract that handles how posts are collected. If the zero address (a special address with no code) is allowed as a module and then assigned to a post, any attempt to collect or mirror that post fails with an error. The report says this only happens if governance (the group that manages whitelisting) makes a mistake or acts maliciously.
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.