Skip to content
Access control Audit finding Intermediate

Token creator can revoke factory's upgrade capability, permanently blocking upgrades

The token factory grants itself the UPGRADER_ROLE on each token it creates, but the token creator is also given DEFAULT_ADMIN_ROLE and ADMIN_ROLE, which allow revoking roles. A malicious creator can revoke the factory's UPGRADER_ROLE, permanently preventing the factory admin from upgrading that token's implementation.

Am3nh3l Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51941 sc high token creator can revoke factory s upgrade capability permanently blocking upgrades

Submitted on Aug 6th 2025 at 19:03:53 UTC by @Am3nh3l for Attackathon | Plume Network

{% hint style="warning" %} Token creators can permanently disable the factory's ability to upgrade token implementations by revoking the factory's UPGRADER_ROLE, creating a permanent denial-of-service for upgrades (blocking security fixes and improvements). {% endhint %}

Brief / Intro

Token creators can revoke the factory's UPGRADER_ROLE, permanently preventing protocol admins from upgrading token implementations. This creates a permanent denial-of-service vulnerability for critical security updates. Other factory-related roles granted to the token creator can also be revoked.

Vulnerability Details

During token creation the factory grants itself UPGRADER_ROLE:

Solidity
token.grantRole(token.UPGRADER_ROLE(), address(this));

The factory exposes an upgrade function that relies on UUPS upgradeability:

Solidity
function upgradeToken(address token, address newImplementation) external onlyRole(DEFAULT_ADMIN_ROLE) {
    ...
    UUPSUpgradeable(token).upgradeToAndCall(newImplementation, "");
    ...
}

However, the token creator is granted DEFAULT_ADMIN_ROLE and ADMIN_ROLE during creation:

Solidity
token.grantRole(token.DEFAULT_ADMIN_ROLE(), msg.sender);
token.grantRole(token.ADMIN_ROLE(), msg.sender);

ArcToken's _authorizeUpgrade enforces that the caller has UPGRADER_ROLE:

Solidity
/**
 * @dev Authorization for upgrades
 */
function _authorizeUpgrade(
    address newImplementation
) internal override onlyRole(UPGRADER_ROLE) { }

Because DEFAULT_ADMIN_ROLE / ADMIN_ROLE holders can call revokeRole (from AccessControlUpgradeable), a malicious token creator can revoke the factory's UPGRADER_ROLE. Once revoked, upgradeToAndCall will fail the _authorizeUpgrade check, preventing any future upgrades initiated by the factory.

Impact Details

The token creator can block the factory admin from upgrading the ArcToken to a new implementation, potentially leaving the token stuck on a vulnerable or outdated version. This undermines the intended upgradeability of the UUPS proxy system and prevents applying fixes or improvements.

Proof of Concept

{% stepper %} {% step %} User creates a token via the factory. {% endstep %}

{% step %} The factory grants itself UPGRADER_ROLE during token creation. {% endstep %}

{% step %} Malicious token creator calls revokeRole to revoke the factory's UPGRADER_ROLE. {% endstep %}

{% step %} Factory admin attempts to upgrade the token via upgradeToAndCall. {% endstep %}

{% step %} The token's _authorizeUpgrade check (requires UPGRADER_ROLE) fails for the factory, so the upgrade is blocked. {% endstep %} {% endstepper %}

References

The original report as published on Immunefi, by Am3nh3l. 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 token creator is granted DEFAULT_ADMIN_ROLE, which allows them to revoke the factory's UPGRADER_ROLE, while the factory's upgrade function depends on that role remaining granted.

Impact

The token creator can block the factory admin from upgrading the ArcToken to a new implementation, potentially leaving the token stuck on a vulnerable or outdated version.

What the attacker needed

Ability to create a token via the factory

How it was found

  1. A user creates a token via the factory.
  2. The factory grants itself UPGRADER_ROLE during token creation.
  3. The malicious token creator calls revokeRole to revoke the factory's UPGRADER_ROLE.
  4. The factory admin attempts to upgrade the token via upgradeToAndCall.
  5. The token's _authorizeUpgrade check fails for the factory, so the upgrade is blocked.

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.

When a token is created, the factory gives itself a special permission (UPGRADER_ROLE) so it can later upgrade the token's code. But the person who created the token also gets admin permissions that let them take permissions away. If that person removes the factory's upgrade permission, the factory can never upgrade the token again, even if there is a security fix.

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 Am3nh3l

View all

3 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.

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.