51589 sc high tokencreator retains upgrade rights fix remains insufficient finding 01 immunefi report

Submitted on Aug 4th 2025 at 09:18:55 UTC by @Boraicho for Attackathon | Plume Network

  • Report ID: #51589

  • Report Type: Smart Contract

  • Report severity: High

  • Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcTokenFactory.sol

  • Impacts:

    • Contract fails to deliver promised returns, but doesn't lose value

Description

Brief / Introduction

When a new ArcToken is created using the createToken function, the ADMIN_ROLE is granted to the msg.sender (i.e., the token creator):

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

This setup allows the token creator to remove or bypass the UPGRADER_ROLE, which is intended to be exclusively assigned to the TokenFactoryAdmin.


Vulnerability Details

The token creator can override the intended control of the ArcTokenFactory over the token’s implementation logic. This undermines the security and trust assumptions of the factory, as upgrade permissions can be exploited without factory or governance oversight to upgrade to malicious implementation contracts.


Impact Details

This issue was classified as critical in the Immunefi report. The Arc system is designed to be a trusted platform where multiple token implementations can coexist, but still under the centralised governance of the system. A malicious token creator could leverage the system’s branding to gain user trust, then upgrade the token with malicious logic—potentially resulting in theft of user assets.


References

The following function represents the upgrade logic, which should only be callable by the TokenFactoryAdmin:


Proof of Concept


Understanding the POC

1

Prepare the test environment

  • Navigate to the attackathon-plume-network/arc/test directory.

  • Replace all code in ArcTokenFactory.t.sol with the Proof of Concept code provided above.

2

Run the test

Execute the following command:

3

What to Observe

  • The final line of the test reverts when the factory owner attempts to upgrade the contract.

  • This happens because the token deployer has revoked the factory's UPGRADER_ROLE and assigned it to themselves, preventing the factory from performing the upgrade.

Was this helpful?