Skip to content
Access control Audit finding Advanced

Stale manager state restores a revoked account that hijacks the migrated ens resolver

The Manager caches an unwrapped name's legacy V1 manager from the subgraph for five minutes and never re-reads the current registry owner before migrating. A manager the registrant has just revoked can therefore be granted persistent resolver authority in V2 and point the migrated name at an attacker-controlled resolver.

Aditya Soni Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

92828 w a medium stale manager state restores a revoked account that hijacks the migrated ens resolver

Submitted on Sep 12th 2026 at 16:37:46 UTC by @hetroublemakr for Audit Competition | ENS

  • Report ID: #92828
  • Report Type: Websites & Apps
  • Report severity: Medium
  • Target: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/manager
  • Impacts:
    • Hijacking or bricking an ENS name during a Manager flow (registration, v1 to v2 migration, or transfer), such as: - a registration or migration that assigns the name, its ownership, registry, or resolver to an attacker - redirecting the recipient of a name transfer - leaving a name permanently inaccessible after the flow

Description

Summary

The Manager derives an unwrapped name's legacy manager from the V1 subgraph and caches that response for five minutes. If the registrant then revokes a compromised manager using the ordinary BaseRegistrar.reclaim(tokenId, registrant) recovery path, the migration flow never reads the current V1 ENSRegistry.owner(node) before execution. Its ownership preflight checks only the BaseRegistrar NFT owner, and its final pre-wallet freshness assertion checks only which temporary approvals are missing.

The stale address therefore remains in managerAddress. The Manager constructs one atomic HCA batch that migrates the name and calls:

Solidity
ETHRegistryV2.grantRoles(labelhash, 1 << 24, revokedManager);

The bit is ROLE_SET_RESOLVER. Post-state verification treats the stale grant as required success, while cleanup revokes only the HCA's temporary operator approval. The revoked manager consequently regains persistent resolver authority in V2 and can point the migrated name at an attacker-controlled resolver.

The fixed-fork PoC proves the full transition using current Sepolia contracts and the live tkn.eth state. The victim first reclaims the V1 manager role from the compromised account. The exact app-equivalent HCA batch then migrates the name and restores the stale account. After Manager-style cleanup, the former manager installs a malicious resolver whose ETH address record returns the former manager. The paired control migrates the same name without the stale grant and proves the former manager's resolver change reverts.

Threat model and required interaction

The attacker is a formerly authorized V1 manager that the registrant has already revoked. At exploit time, the attacker needs no NFT ownership, approval, HCA authority, wallet key, session, or V2 role. The victim must have loaded the Manager while that address was still indexed as manager, reclaim control from the compromised manager, and complete the normal migration while the cached snapshot remains in use. The app's own five-minute fresh-cache interval makes this deterministic without requiring a subgraph outage; ordinary index lag can extend the race.

The victim performs the expected migration wallet confirmations. This report does not claim a zero-interaction attack. It claims the program's explicit Critical migration-hijack impact: a normal Manager migration silently assigns resolver authority to an account the registrant just revoked.

Impact

A compromised V1 manager that the registrant has successfully removed can regain persistent V2 ROLE_SET_RESOLVER authority solely because the victim uses the normal Manager migration flow before its cached authority snapshot is refreshed. The revoked account can then replace the resolver with attacker-controlled code, causing the migrated ENS name's ETH address record to resolve to the attacker. It can alternatively point to a non-resolver and brick resolution.

This is not a claim of NFT ownership theft or a demonstrated public-chain fund transfer. It is the program's exact Critical impact 6286: the Manager's v1-to-v2 migration assigns the name's resolver authority to an attacker and enables name hijacking. The stale role remains after the app's advertised temporary-access cleanup and requires a separate V2 revocation by the victim.

Link to Proof of Concept

https://gist.github.com/hetroublehacker/6368619d5ee167ab9b96c0210144ae29

Proof of Concept

  1. Save the single gist file as FindingStandalone.t.sol and optionally verify its SHA-256:
Bash
sha256sum FindingStandalone.t.sol

Expected digest:

9d00abda1cb84fe92ca67289b4c4d7e61c90a190664d13f1a20be527cd7becc1
  1. Put the file in an otherwise empty Foundry test directory. It has no imports, so no repository clone, forge-std, Node.js, pnpm, or ENS dependencies are needed:
Bash
mkdir -p finding/test
cp FindingStandalone.t.sol finding/test/
  1. With Foundry and Internet access to an archive-capable Sepolia RPC, run the two tests:
Bash
forge test --root finding --match-contract FindingStandaloneTest -vv

The file defaults to https://ethereum-sepolia-rpc.publicnode.com. To use a different endpoint:

Bash
SEPOLIA_RPC_URL='https://YOUR_SEPOLIA_ARCHIVE_RPC' \
  forge test --root finding --match-contract FindingStandaloneTest -vv
  1. Confirm the exploit and negative control both pass:
Ran 2 tests for test/FindingStandalone.t.sol:FindingStandaloneTest
[PASS] testControl_NoStaleGrantMeansFormerManagerCannotSetResolver()
[PASS] testExploit_StalePlanRestoresRevokedManagerAndHijacksResolver()
Suite result: ok. 2 passed; 0 failed; 0 skipped
  1. Inspect the logs. They show cached manager 0x741d...d08, authoritative manager 0x3cDB...c6De after victim-authorized reclaim(), the stale V2 role surviving HCA cleanup, and the attacker-controlled ETH resolution. The control reports a zero stale-manager role and rejects the same resolver change.

All writes remain confined to the disposable fixed-block fork. The public endpoint is used only for historical reads; no transaction is signed or broadcast.

The original report as published on Immunefi, by hetroublemakr. 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 migration flow trusts a cached subgraph snapshot of the legacy manager instead of reading the current V1 registry owner, and its preflight and freshness checks only cover the NFT owner and temporary approvals.

Impact

A revoked manager could regain persistent resolver authority and redirect the name's ETH address record to the attacker or brick resolution; the stale role survives the app's cleanup and needs a separate V2 revocation.

What the attacker needed

Victim loaded Manager before cache refresh; victim reclaims from compromised manager; victim completes migration within cache window; attacker was a previously authorised manager

How it was found

  1. Load the Manager while the compromised address is still indexed as the name's manager.
  2. Reclaim control from the compromised manager using the ordinary recovery path.
  3. Complete the normal migration while the cached snapshot is still in use.
  4. The batch grants the stale address the set-resolver role, and cleanup revokes only the temporary operator approval.
  5. The former manager installs a malicious resolver that returns their own ETH address.

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 name service lets people register names and decide which contract answers lookups for them, called a resolver. The app remembered an old list of who was allowed to manage a name, and when the real owner removed a bad manager, the app still used the old list during migration, so the removed manager got control back.

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 Aditya Soni

View all

1 more disclosed report, best first.

More from ENS

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.