Skip to content
Access control Audit finding Beginner

Rescuer role not assigned during initialization

The vault's initialisation function grants several roles but never assigns the rescuer role, so no address can perform rescue operations after deployment. This could delay recovery of shares or pending withdrawals from blocklisted accounts until an admin manually grants the role.

VinayVig Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

59330 sc insight rescuer role not assigned during initialization

Submitted on Nov 11th 2025 at 07:50:57 UTC by @VinayVig for Audit Comp | Firelight

Description

Brief/Intro

The RESCUER_ROLE is never assigned during the initialization of the FirelightVault contract. As a result, no address initially has permission to perform rescue operations (such as recovering shares or pending withdrawals from blocklisted accounts). This could cause operational delays or configuration issues post-deployment.

Vulnerability Details

In the initialize() function, the contract grants roles like DEFAULT_ADMIN_ROLE, DEPOSIT_LIMIT_UPDATE_ROLE, BLOCKLIST_ROLE, PAUSE_ROLE, and PERIOD_CONFIGURATION_UPDATE_ROLE based on the provided InitParams. However, the RESCUER_ROLE is missing from this setup:

Solidity
  function initialize(
        IERC20 _asset,
        string memory _name,
        string memory _symbol,
        bytes memory _initParams
    ) public initializer {
        InitParams memory initParams = abi.decode(_initParams, (InitParams));
        __ERC20_init(_name, _symbol);
        __ERC4626_init(_asset);
        __Pausable_init();
        __ReentrancyGuard_init();
        __AccessControl_init();

        if (address(_asset) == address(0)) {
            revert InvalidAssetAddress();
        }

        if (initParams.depositLimit == 0) {
            revert InvalidDepositLimit();
        }

        if (initParams.periodConfigurationDuration == 0) {
            revert InvalidPeriodConfigurationDuration();
        }

        if (initParams.defaultAdmin == address(0)) {
            revert InvalidAdminAddress();
        }

        depositLimit = initParams.depositLimit;
        _addPeriodConfiguration(Time.timestamp(), initParams.periodConfigurationDuration);
        contractVersion = 1;

        _grantRole(DEFAULT_ADMIN_ROLE, initParams.defaultAdmin);
        if (initParams.limitUpdater != address(0)) {
            _grantRole(DEPOSIT_LIMIT_UPDATE_ROLE, initParams.limitUpdater);
        }

        if (initParams.blocklister != address(0)) {
            _grantRole(BLOCKLIST_ROLE, initParams.blocklister);
        }

        if (initParams.pauser != address(0)) {
            _grantRole(PAUSE_ROLE, initParams.pauser);
        }

        if (initParams.periodConfigurationUpdater != address(0)) {
            _grantRole(PERIOD_CONFIGURATION_UPDATE_ROLE, initParams.periodConfigurationUpdater);
        }
@>       // @audit-info where is RESCUER_ROLE
    }

Impact Details

Although this does not pose a direct financial risk, it can delay the rescue of funds from blocklisted addresses and reduce contract responsiveness during critical recovery operations. If the admin forgets to assign the role, rescue functionality remains unusable indefinitely.

References

initialize() function in FirelightVault.sol rescueSharesFromBlocklisted() and rescueWithdrawFromBlocklisted() functions

Proof of Concept

Proof of Concept

  1. Deploy the FirelightVault contract using the provided initialize() function parameters.
  2. Observe that RESCUER_ROLE is never assigned within the initializer.
  3. Verify post-deployment that no address holds the RESCUER_ROLE:
Solidity
bool hasRole = vault.hasRole(RESCUER_ROLE, someAddress);
// returns false
  1. This confirms that rescue functionality is unavailable until the admin manually assigns the role.

The original report as published on Immunefi, by VinayVig. 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

The initializer grants the other roles from its parameters but omits any grant of the rescuer role.

Impact

There is no direct financial risk, but rescue of funds from blocklisted addresses could be delayed and the role may stay unassigned indefinitely if the admin forgets.

What the attacker needed

Deployment of the vault; admin must assign the role manually

The fix

The initializer should grant the rescuer role to a configured address, as it does for the other roles.

How it was found

  1. Deploy the vault using the initialisation parameters.
  2. Note that the initializer never assigns the rescuer role.
  3. Check after deployment that no address holds the rescuer role.
  4. Conclude that rescue functions are unusable until an admin assigns the role manually.

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 smart contract can give different permissions to different addresses, called roles. This vault sets up several roles when it is first deployed, but forgets one of them, the role needed to rescue funds from blocked accounts. Nothing is stolen, but the rescue feature simply cannot be used until an administrator adds that role by hand.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by VinayVig

View all

1 more disclosed report, best first.

More from Firelight

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.