Creator Retains DEFAULT_ADMIN_ROLE, Allowing Bypass of Upgrade Restrictions
The token creator retains the DEFAULT_ADMIN_ROLE after deployment, which lets them grant themselves the UPGRADER_ROLE and upgrade the token contract to any arbitrary implementation. This bypasses the factory's whitelist of approved implementations and could allow malicious logic such as locking user tokens or bypassing protocol restrictions.
- Disclosed after under an hour
52218 sc high creator retains default admin role allowing bypass of upgrade restrictions
Submitted on Aug 8th 2025 at 18:45:49 UTC by @aksoy for Attackathon | Plume Network
- Report ID: #52218
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcToken.sol
- Impacts:
- Token Creator Can Upgrade To Malicous Implementation
Description
Brief/Intro
The ArcTokenFactory is designed to restrict token upgrades to only whitelisted implementations to prevent malicious token creators from injecting harmful logic. However, due to flawed access control in the upgrade mechanism, creators can still directly upgrade their ArcToken contracts without going through the factory’s checks. This completely bypasses the intended restriction.
Vulnerability Details
The ArcTokenFactory enforces upgrade safety by ensuring only pre-approved (whitelisted) implementation addresses can be used for upgrades. This mechanism is intended to mitigate the risk of token creators adding malicious code after deployment. When creating a token, the upgrader role is assigned to the factory to prevent the creator from upgrading token .
function createToken(...
) external returns (address) {
...
// Grant all necessary roles to the owner
// Grant the DEFAULT_ADMIN_ROLE to the deployer
...
token.grantRole(token.UPGRADER_ROLE(), address(this));
The token contract uses OpenZeppelin’s AccessControl for role management. While upgradeability is intended to be restricted (e.g., via a global whitelist or controlled governance process), the creator of the token retains the DEFAULT_ADMIN_ROLE after deployment.
In OpenZeppelin’s access model, DEFAULT_ADMIN_ROLE has full authority over all roles, including the ability to grant or revoke the UPGRADER_ROLE. This means that even if the creator is not initially assigned the upgrader role, they can later grant it to themselves or to any other address they control. By doing so, the creator can upgrade the token contract to any arbitrary implementation, potentially bypassing global whitelist checks or other upgrade restrictions in the protocol.
Impact Details
The creator can bypass global upgrade controls and upgrade the token.
References
Proof of Concept
{% stepper %} {% step %}
Step
The token creator deploys the contract and retains the DEFAULT_ADMIN_ROLE, which allows granting or revoking any role in the contract. {% endstep %}
{% step %}
Step
At any point in the future, the creator decides to grant the UPGRADER_ROLE to themselves. {% endstep %}
{% step %}
Step
With the UPGRADER_ROLE, the creator can upgrade the token contract implementation to any arbitrary contract. {% endstep %}
{% step %}
Step
The new implementation can contain malicious logic, such as:
- Locking all users’ tokens to prevent sales or transfers.
- Bypassing the protocol’s global whitelist checks.
- Allowing blacklisted addresses to transfer tokens or earn yield. {% endstep %}
{% step %}
Step
As a result, the upgrade could be used to bypass protocol restrictions, or perform malicious actions without any checks from the original deployment. {% endstep %} {% endstepper %}
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 factory grants DEFAULT_ADMIN_ROLE to the token creator, and in OpenZeppelin AccessControl that role can grant any other role including UPGRADER_ROLE, so the factory's whitelist check is bypassed.
Impact
The creator could bypass global upgrade controls and upgrade the token to a malicious implementation, potentially locking user tokens or bypassing protocol restrictions.
What the attacker needed
Creator deploys a token via the factory; creator retains DEFAULT_ADMIN_ROLE
The fix
The factory should not leave DEFAULT_ADMIN_ROLE with the creator, or should revoke it after setup so only the factory or governance can grant UPGRADER_ROLE.
How it was found
- The token creator deploys the contract and keeps DEFAULT_ADMIN_ROLE.
- Later the creator grants UPGRADER_ROLE to themselves.
- With UPGRADER_ROLE the creator upgrades the token to any arbitrary implementation.
- The new implementation can contain malicious logic such as locking user tokens or bypassing whitelist checks.
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 token contract has roles that control who can do what. The most powerful role, called DEFAULT_ADMIN_ROLE, can give out any other role. The factory meant to stop creators from changing the token's code later, but it left this powerful role with the creator, so they can simply give themselves the upgrade role and swap in new code.
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.