Skip to content
Misconfiguration Audit finding Advanced

YieldBlacklistRestrictions Uses Slot 0 Instead of Unstructured Storage, Risking Slot Collision

The YieldBlacklistRestrictions contract stores its blacklist mapping in the default slot 0 instead of a dedicated unstructured storage slot, unlike the WhitelistRestrictions contract. This creates a latent risk of storage collisions during upgrades or inheritance changes, which could corrupt the blacklist and allow unauthorised yield claims or cause a denial of service.

Paludo0x Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

50187 sc insight yieldblacklistrestrictions uses slot 0 instead of unstructured storage risking slot collision

Submitted on Jul 22nd 2025 at 11:32:04 UTC by @Paludo0x for Attackathon | Plume Network

{% hint style="info" %} Category: Insight → Security best practices {% endhint %}

Description

Vulnerability Details

Contract YieldBlacklistRestrictions declares its _isBlacklisted mapping in the compiler-assigned slot 0 rather than behind its own unstructured storage slot.

This deviates from the pattern used by contract WhitelistRestrictions and from standard upgradeable contract practices. It opens the door to storage collisions with other inherited contracts or future module upgrades, potentially corrupting the blacklist and allowing unauthorized yield distributions.

By not allocating a unique slot for the blacklist mapping, any additional state added in parent contracts or future upgrades could land in slot 0, overwriting _isBlacklisted data or vice versa.

Impact Details

Potential High Impact if Exploited:

  • Theft of Unclaimed Yield: Corrupted blacklist entries may unintentionally whitelist addresses that should be blocked, allowing them to claim yield.
  • Denial of Service: Overwriting blacklist state could render the contract unable to enforce restrictions, freezing or disabling legitimate yield distributions.

Although currently each module is deployed behind its own proxy, the inconsistent storage pattern is a latent risk that can manifest during upgrades, inheritance changes, or multi-module compositions.

Proof of Concept (code examples)

<details> <summary>Proof of Concept — direct mapping declaration vs. isolated slot</summary>

In YieldBlacklistRestrictions.sol the blacklist state is declared directly as:

Solidity
    // Mapping for yield blacklist (address => true if blacklisted)
    mapping(address => bool) private _isBlacklisted;

Contrastingly, WhitelistRestrictions isolates its state in a dedicated slot via:

Solidity
bytes32 private constant WHITELIST_STORAGE_LOCATION = keccak256("whitelist.restrictions.storage");
</details>

Recommended Mitigation (best practice)

  • Move the _isBlacklisted mapping behind an unstructured storage slot (use a unique bytes32 constant derived from a descriptive string and access it via inline assembly or a storage struct pattern).
  • Follow the same storage-slot isolation pattern used in WhitelistRestrictions and other upgradeable modules to prevent future collisions.
  • Where practical, add tests to ensure that adding state variables in parent/child contracts does not change the layout of existing storage used by modules.

References

The original report as published on Immunefi, by Paludo0x. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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 blacklist mapping was declared as a normal state variable, so the compiler placed it in slot 0, instead of using a unique unstructured storage slot as done in the related WhitelistRestrictions contract.

Impact

If exploited, corrupted blacklist entries could allow blocked addresses to claim yield or could disable the contract's ability to enforce restrictions, though the report notes this is currently a latent risk because each module is deployed behind its own proxy.

What the attacker needed

Future upgrade or inheritance change

The fix

The blacklist mapping should be moved behind a unique unstructured storage slot, following the same pattern used in WhitelistRestrictions, and tests should be added to ensure storage layout stability.

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.

Smart contracts store data in numbered slots. If two different pieces of data are assigned the same slot, one can overwrite the other. This report says the blacklist is placed in a default slot that could clash with other data added later, so the blacklist might stop working correctly.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by Paludo0x

View all

42 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.