V1 v2 migration resurrects a revoked legacy manager with fresh role set resolver after the victim reclaims the v1 node
The ENS Manager migration flow derived a manager address from the V1 GraphQL owner field and granted that address a fresh V2 resolver role without re-checking the current V1 registry owner at confirmation time. A former manager who had been revoked via reclaim could therefore receive resolver authority and point the victim's migrated name at an attacker-controlled resolver.
- Disclosed after under an hour
# 91824 w a medium v1 v2 migration resurrects a revoked legacy manager with fresh role set resolver after the victim reclaims the v1 node
**Submitted on Sep 4th 2026 at 15:13:07 UTC by @manvi for** [**Audit Competition | ENS**](https://immunefi.com/audit-competition/audit-competition-ens)
* **Report ID:** #91824
* **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
### Brief / Intro
I analysed the Manager V1→V2 migration workflow and observed that a V1 manager identity obtained from the V1 GraphQL response is treated as authorization truth for a new V2 permission grant.
For an unwrapped V1 `.eth` name, Manager derives:
```
managerAddress
```
from:
```
domain.owner.id
```
and later grants that address:
```
ROLE_SET_RESOLVER
```
on the migrated V2 name.
The critical issue is that I did not find any final-confirmation check that binds this new destination-chain permission grant to the **current** V1 `ENSRegistry.owner(node)`.
I reproduced the following sequence:
```
A = BaseRegistrar registrant / victim
C = legitimate V1 manager at preview time
1. Manager reads C and fully prepares the migration.
2. A calls canonical BaseRegistrar.reclaim(...).
3. V1 ENSRegistry.owner(node) becomes A.
4. A direct mutation attempt from C fails.
5. C therefore has no V1 manager authority.
6. The V1 source is updated to A.
7. I replay the exact V1 GraphQL request through the browser.
8. The actual served HTTP payload reports owner.id = A.
9. Only after that observation does A click the final Upgrade button.
10. Manager still grants C fresh V2 ROLE_SET_RESOLVER.
11. C uses that new role to install an attacker resolver.
12. The victim's migrated ENS name resolves to C.
```
The final hardened run therefore proves that this is not merely:
```
stale subgraph response
-> stale grant
```
The source can already be current and safe before final confirmation. The vulnerable object is the previously prepared migration security state and the missing execution-time identity revalidation.
Observed result:
```
V1 manager before preview = C
C V2 roles before migration = 0x0
V1 manager after reclaim = A
C can mutate V1 after reclaim = false
actual served V1 owner.id = A
victim clicks final Upgrade
C V2 roles after migration = 0x1000000
C has ROLE_SET_RESOLVER = true
C setResolver(attackerResolver) = success
victim.eth resolves to = C
victim V2 ERC1155 balance = 1
```
***
## Vulnerability Details
### 1. Manager derives the security-sensitive manager identity from V1 `domain.owner.id`
I traced the V1 manager classification to:
```
packages/migration/src/service/classifyNames.ts
```
For an unwrapped `.eth` name, the code derives:
```ts
const registryOwnerAddress = toAddress(domain.owner.id)
const managerAddress =
registryOwnerAddress &&
registryOwnerAddress.toLowerCase() !== registrant.id.toLowerCase()
? registryOwnerAddress
: null
```
I observed that this value is not merely informational UI data. It becomes a security-sensitive destination-chain role recipient.
For the reproduced state:
```
BaseRegistrar registrant = A
ENS Registry owner = C
```
classification produces:
```
managerAddress = C
```
### 2. The classified address is granted fresh V2 `ROLE_SET_RESOLVER`
I traced `managerAddress` into:
```
apps/manager/src/features/migration/service/buildRoleGrantCalls.ts
```
where Manager builds:
```ts
const ROLE_SET_RESOLVER = 1n << 24n
args: [
resource,
ROLE_SET_RESOLVER,
name.managerAddress,
]
```
The permission is therefore created from the previously classified identity.
The relevant trust conversion I observed is:
```
V1 GraphQL domain.owner.id
|
v
managerAddress
|
v
prepared migration plan
|
v
grantRoles(
resource,
ROLE_SET_RESOLVER,
managerAddress
)
```
### 3. The role grant is included in the migration execution batch
I traced the same identity into:
```
apps/manager/src/features/migration/service/buildAtomicMigrationBatches.ts
```
The migration adds:
```ts
if (classified.managerAddress) {
innerExecutions.push({
phase: 'manager-role-grant',
name,
names: [name],
call: buildRoleGrantCall(classified),
})
}
```
I therefore observed that a V1-source identity becomes a persistent V2 authorization change during the migration itself.
### 4. The migration path does not live-read V1 `ENSRegistry.owner(node)` before creating the new role
I reviewed the Manager migration contract configuration and execution path.
The V1 migration contract set includes the V1 `BaseRegistrar` and `NameWrapper`, but I did not find a migration-path live read of:
```
ENSRegistry.owner(node)
```
that validates:
```
current V1 manager == plan.classified.managerAddress
```
before `manager-role-grant` executes.
The missing check is effectively:
```
currentManager = ENSRegistry.owner(namehash(name))
if currentManager != plan.managerAddress:
invalidate / rebuild migration plan
```
Without that binding, an identity that was authorized during preview can become unauthorized before confirmation while remaining embedded in the prepared migration state.
### 5. `assertMigrationApprovalPlanCurrent()` rechecks approval shape, not manager identity
I analysed the execution-time migration approval revalidation.
The manager-restoration condition is derived from whether any classified name has a non-null manager:
```
requiresManagerRestoration = true / false
```
The check therefore captures the **existence** of a manager-restoration requirement, but not the identity of the manager that is about to receive the role.
The vulnerable state can become:
```
prepared plan:
managerAddress = C
current V1 chain:
ENSRegistry.owner(node) = A
approval shape:
manager restoration required = true
identity comparison:
C == A ? NOT PERFORMED
```
A manager identity change can therefore preserve the same approval-key shape and pass execution-time revalidation.
### 6. The five-minute V1 cache makes the victim-remediation sequence realistic
I observed that `useV1Names` configures:
```ts
staleTime: 5 * 60 * 1000
```
This matters for a normal user sequence:
```
1. Victim opens Manager.
2. Manager reads manager C.
3. Migration preview is prepared.
4. Victim switches to another tab/tool.
5. Victim calls BaseRegistrar.reclaim() to remove C.
6. Victim returns to Manager within five minutes.
7. The V1-name query remains fresh.
8. Window focus therefore does not force that query to refetch.
9. Victim continues the migration.
```
I do not consider this a contrived "victim deliberately uses stale data" path. `BaseRegistrar.reclaim()` is the canonical unilateral remediation available to the registrant.
The application gives no indication that the reviewed manager-restoration identity has become invalid.
### 7. A plan/gas-estimate rebuild does not necessarily remove the stale identity
I also analysed the interaction with the migration plan / gas-estimate query.
Even where the plan query itself is rebuilt or refreshed, it can rebuild from the still-fresh five-minute `useV1Names` data.
The apparent safety mechanism can therefore reproduce:
```
managerAddress = C
```
from cached V1 input.
This is why I treat the bug as a security-input revalidation defect rather than merely a stale-screen rendering issue.
### 8. `BaseRegistrar.reclaim()` proves that C's V1 authority was actually removed
In the hardened PoC, victim `A` executes:
```
BaseRegistrar.reclaim(C -> A)
```
before the final Upgrade click.
I then directly read:
```
ENSRegistry.owner(node)
```
and observed:
```
A
```
I also attempted a V1 `setOwner()` mutation from `C`.
Observed result:
```
C can mutate V1 after reclaim = false
```
The finding therefore does not infer revocation from UI state. I directly proved that the former manager was no longer authorized on V1 before the victim confirmed migration.
### 9. The hardened PoC proves the external V1 source itself served A before the final click
I specifically hardened the PoC to remove the strongest possible "malicious/stale indexer" rebuttal.
During migration planning I capture the exact V1 GraphQL request bodies used by Manager.
After `reclaim()` I update the test's V1 source to the current chain state and replay the captured request through the browser. Because the replay goes through the browser, the existing Playwright `page.route()` V1 interception serves the response.
I then inspect the **actual returned HTTP JSON** and locate the target name's:
```
owner.id
```
Observed before final Upgrade:
```
[M1] OBSERVED actual V1 HTTP response owner.id AFTER reclaim =
0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
```
which is victim `A`.
The PoC asserts:
```
actual served owner.id == victim A
```
and logs:
```
[M1] �
actual served V1 payload reports A BEFORE final Upgrade click
```
Only after this assertion succeeds does the victim click the final Upgrade button.
This establishes:
```
current V1 chain manager = A
actual served V1 source = A
but prepared migration role recipient = C
```
### 10. Post-migration verification is circular because it verifies the same stale identity used to build the grant
I observed that `buildAtomicMigrationBatches.ts` also builds the `manager-role` verification expectation from:
```
classified.managerAddress
```
The same stale value therefore participates in both:
```
1. the role grant
2. the expected post-state
```
The effective check is:
```
Did V2 grant ROLE_SET_RESOLVER to C,
where C is the address the prepared plan already expected?
```
rather than:
```
Was C still the current V1 manager when A confirmed migration?
```
The verification relationship is therefore:
```
stale classified manager C
|
+--> build grant to C
|
+--> expect role on C
|
v
verifier sees role
|
v
migration verified
```
I observed Manager report migration completion after the unauthorized role was created.
The verifier proves that execution matched the prepared plan. It does not prove that the plan's security-sensitive identity remained authorized.
### 11. The migration creates fresh authority; this is not persistence of a pre-existing V2 role
Before migration I directly read:
```
C V2 roles = 0x0
```
After the victim's remediation and migration I directly read:
```
C V2 roles = 0x1000000
```
and asserted:
```
C has fresh V2 ROLE_SET_RESOLVER = true
```
The transition is therefore:
```
0x0
|
| Manager migration
v
0x1000000
```
The migration **creates** the authority.
### 12. C immediately converts the fresh role into resolver hijack
After observing the unauthorized role grant, I deployed an attacker-controlled resolver from `C` using a normal EVM contract-creation transaction.
Observed deployment:
```
status = success
attacker resolver =
0xd98394c99151e9f7479447a52b6c4ecc521eb467
```
I then had `C` execute:
```
ETHRegistry.setResolver(resource, attackerResolver)
```
Observed:
```
status = success
```
The victim's migrated name then resolved to:
```
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
```
which is `C`.
### 13. The victim remains the legitimate V2 owner
I separately read V2 ERC-1155 ownership.
After migration:
```
victim V2 ERC1155 balance = 1
```
After the resolver hijack:
```
victim V2 ERC1155 balance = 1
```
I therefore observed an unauthorized resolver-control grant while ownership remained with the victim.
This isolates the demonstrated impact to the migration-created permission and resolver hijack rather than an ownership-transfer artifact.
***
## Why this is not merely a UI/UX issue
The migration UI is relevant because it is the user-facing flow through which the victim authorizes migration, but the demonstrated impact is persistent on-chain authorization and resolver state.
I directly observed:
```
before migration:
C V2 roles = 0x0
after migration:
C V2 roles = 0x1000000
attacker action:
C -> ETHRegistry.setResolver(...)
transaction:
success
final resolution:
victim.eth -> C
```
The V2 role bitmap and resolver address are read directly from chain state.
The issue therefore persists independently of any subsequent frontend rendering or indexer synchronization.
***
## Why this is not intended design
Manager restoration itself can be a legitimate migration feature. The issue is **which address** is restored.
I reproduced a state where:
```
C was legitimate at preview time
C was revoked before final confirmation
V1 chain says current manager = A
actual V1 HTTP source says current manager = A
```
yet migration still recreates `C`'s authority.
I do not see a reasonable design interpretation under which "restore the existing manager" means "restore an address that is no longer the manager when the user confirms."
The intended security property should be:
```
restore current authorized V1 manager
```
not:
```
restore whichever manager happened to be present
when an earlier migration snapshot was prepared
```
The user receives no warning that `reclaim()` has been silently invalidated by the prepared migration state.
***
## Why this does not require a trusted or privileged actor
The exploit path does not require:
* ENS governance access;
* application administrator access;
* privileged backend credentials;
* control of the V1 subgraph;
* a malicious indexer;
* a compromised RPC;
* a privileged V2 registry role before migration;
* a compromised victim key;
* a malicious browser extension.
At final confirmation I verified:
```
C V1 authority = none
C V2 roles = 0x0
```
The only reason `C` can later change the resolver is that the victim's normal Manager migration creates the fresh V2 role.
The local PoC fixture uses Anvil-only historical setup to create a migratable V1 name because old V1 registration controllers are no longer active after the V2 cutover. Those fixture operations are test-environment setup only and are not part of the exploit or attacker capability.
***
## Why reclaim + continuing migration is a realistic supported workflow
I do not consider the victim's `reclaim()` action an artificial prerequisite.
`BaseRegistrar.reclaim()` is the canonical unilateral mechanism by which the `.eth` registrant can restore ENS Registry ownership of the node.
A realistic user flow is:
```
Victim begins Manager migration
-> sees / discovers old manager C
-> uses canonical reclaim() remediation
-> reclaim succeeds
-> returns to the still-open Manager migration
-> Manager gives no stale-security-state warning
-> victim continues
```
The five-minute V1 cache makes returning to the still-open migration within that interval practical.
I also observed that the user does not need to manipulate React state, localStorage, browser developer tools, the QueryClient, or migration internals.
The application silently invalidates the security effect of the user's own remediation.
***
## Why this is not a third-party V1 subgraph / indexer issue
The hardened PoC directly addresses this boundary.
I did **not** leave the V1 source reporting `C` after `reclaim()`.
Instead:
```
after reclaim:
chain manager = A
mock source = A
```
I then replayed the exact GraphQL request through the browser and inspected the actual response.
Observed:
```
actual HTTP owner.id = A
```
before:
```
victim clicks final Upgrade button
```
The migration still granted `C` fresh `ROLE_SET_RESOLVER`.
The final exploit therefore does not depend on:
```
malicious indexer
stale indexer
compromised subgraph
incorrect GraphQL response
```
The source can already be correct. The in-scope Manager application fails to rebind the prepared security-sensitive role grant to current authorization.
***
## Why this is not a transfer-time existing-role persistence issue
I also distinguished this finding from cases where a V2 delegated role already exists and survives an ownership transfer.
This PoC begins with:
```
C V2 roles BEFORE migration = 0x0
```
and ends with:
```
C V2 roles AFTER migration = 0x1000000
```
The vulnerable migration creates a new permission. It is not preserving a V2 permission that `C` already had.
***
## Why this is not one of the disclosed known issues
I reviewed the disclosed ENS Audit Competition known-issue material against this root cause.
The known transfer/role-combination issue describes later profile or primary-name errors arising from certain role combinations.
This finding is different:
```
known functional breakage:
role combination
-> later operation errors
this finding:
V1 manager revoked before final confirmation
-> migration creates fresh V2 ROLE_SET_RESOLVER
-> former manager successfully installs attacker resolver
-> victim name resolves to former manager
```
The known-issue guidance also distinguishes a demonstrated security consequence where a role combination grants authority that it should not grant from merely functional breakage.
I also compared this finding against the known parent-transfer / registry-detachment behavior. That issue concerns transfer-time state and follow-up subname/primary-name behavior. This report concerns a V1→V2 migration security input that becomes stale after canonical V1 remediation and is then used to create fresh V2 authority.
The root invariant here is:
> **An address that is no longer authorized as the V1 ENS Registry manager when the registrant confirms migration must not receive fresh V2 permissions from that migration.**
I did not identify a disclosed known issue covering that root cause and demonstrated resolver-hijack consequence.
***
## Audited Revision Verification
The ENS Audit Competition scope corresponds to upstream ENS revision:
```
63772fd872af472ced58b009499355f3430c2a86
```
The frozen Immunefi competition import used for the PoC is:
```
cda79acaad59711b943fc68207ebb3f1d0ff8596
```
The import corresponds to the upstream audited revision.
My analysis checkout used:
```
/workspaces/audit-comp-ens
branch: audit/ens-security-63772
```
The isolated PoC worktree used:
```
/workspaces/ens-wrapper-retention-poc
branch: poc/wrapper-root-retention
```
The branch name is historical from an earlier candidate; the final PoC in that worktree is the stale-manager migration PoC described in this report.
The PoC worktree was based on the frozen competition import. I did not modify the vulnerable production Manager migration logic to make the exploit succeed.
The local changes used for reproduction were limited to E2E/test infrastructure necessary to:
* create a historical migratable V1 name on the local Sepolia/Anvil environment;
* model a V1 registrant and V1 registry manager as different addresses;
* intercept the remote V1 GraphQL endpoint for locally-created state;
* capture and inspect the actual served V1 HTTP payload;
* execute the browser-to-chain exploit; and
* isolate the test in a one-test Playwright configuration.
Final runtime environment:
```
Node: v22.22.1
pnpm: 10.27.0
chain: 11155111 (Sepolia)
```
Relevant canonical/local-fork addresses observed in the final environment:
```
V1 ENS Registry:
0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
V1 BaseRegistrar:
0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85
V2 ETHRegistry:
0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2
V2 ETHRegistrar:
0xa88553F454b77203B0D036A05c894d555EAAa2Cc
```
The final hardened browser E2E run completed with:
```
1 passed (1.1m)
```
***
## Impact Details
I reproduced a complete unauthorized resolver-control transition.
Final successful run:
```
name:
m1-stale-manager-final-1788325410.eth
victim A:
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
former manager C:
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
```
Before migration:
```
V1 manager:
C
C V2 role bitmap:
0x0
```
Victim remediation:
```
BaseRegistrar.reclaim(C -> A):
success
V1 manager after reclaim:
A
C can mutate V1:
false
```
Source-state proof before final Upgrade:
```
actual served V1 HTTP owner.id:
0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
```
which is `A`.
After Manager migration:
```
victim V2 ERC1155 balance:
1
C V2 role bitmap:
0x1000000
C has ROLE_SET_RESOLVER:
true
A has ROLE_SET_RESOLVER_ADMIN:
true
```
Attacker resolver:
```
0xd98394c99151e9f7479447a52b6c4ecc521eb467
```
Attacker actions:
```
deploy resolver:
success
C replaces victim resolver:
success
```
Final resolution:
```
m1-stale-manager-final-1788325410.eth
->
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
```
which is `C`.
Victim ownership after resolver hijack:
```
V2 ERC1155 balance = 1
```
The demonstrated impact is therefore not theoretical permission drift. I observed a former manager with no V1 authority and no prior V2 role receive fresh resolver authority from migration and immediately use it to make the victim's migrated ENS name resolve to the former manager.
Relevant transaction hashes from the final run:
```
A assigns C as V1 manager:
0x4f15005b05637149eeb14bbbea2a637aad4c5593f4be763d7bbac35e7c7db088
A executes BaseRegistrar.reclaim(C -> A):
0x6899750bc1468f226ecff231d842429feb3fc084a6b5e4d21c4debe827f8a410
C deploys attacker resolver:
0xbc926259f20e7c514a769a59d437843171320bd44ff4d5bdcd107ac7d12ace43
C replaces victim V2 resolver:
0x376e41a48158c0aa0574e903dff98a596073594f73e0a9c6e3b6aab3a89ba915
```
I conservatively do not claim permanent control because `A` receives the corresponding resolver admin role and can revoke `C` after discovering the migration-created permission.
***
## Preconditions
1. The victim is the legitimate BaseRegistrar registrant of a V1 unwrapped `.eth` name.
2. At the time Manager initially prepares the migration, the V1 ENS Registry manager is a different address `C`.
3. Manager consumes that legitimate initial state and prepares the migration with `managerAddress = C`.
4. Before final migration confirmation, the victim uses `BaseRegistrar.reclaim()` to restore the V1 node to themselves.
5. The victim continues the already-open Manager migration flow.
6. The migration executes before the prepared/cached manager identity is securely rebound to current V1 authorization.
No ENS governance access, application administrator access, compromised indexer, malicious RPC, privileged V2 role, compromised victim key, same-block ordering, unusual token behavior, or malicious external contract is required.
At final confirmation the PoC explicitly proves:
```
C V1 authority = none
C V2 roles = 0x0
actual served V1 owner.id = A
```
***
## Recommended Remediation
The destination-chain role grant should be bound to the current authoritative V1 manager at execution time.
### Option 1 — live-read `ENSRegistry.owner(node)` immediately before the irreversible role grant
Before executing the migration batch, resolve:
```
currentManager = ENSRegistry.owner(namehash(name))
```
Then require:
```
currentManager == plan.managerAddress
```
If not:
```
invalidate plan
refetch source state
rebuild migration
require fresh user review
```
This is the strongest fix because the security-sensitive identity is checked against canonical chain state at the point where it is converted into a V2 permission.
### Option 2 — bind manager identity into migration-plan freshness / approval validation
Do not reduce manager restoration to:
```
requiresManagerRestoration = true
```
Bind the actual address:
```
managerAddress = C
```
into the migration security-state fingerprint.
Any change from:
```
C -> A
```
must invalidate the old plan even if the high-level set of approval transactions remains the same.
### Option 3 — derive `manager-role-grant` from freshly validated authority, not stale `classified`
The role-grant builder should consume a manager identity that has been freshly validated immediately before execution.
It should not use an identity solely because it exists in an older `ClassifiedName`.
### Option 4 — make post-migration verification non-circular
The verifier should not merely ask whether the stale plan's recipient received the stale plan's role.
It should verify:
```
recipient granted in V2
==
manager authorized by current V1 source-of-truth
```
If the V1 manager changed before confirmation, verification should fail closed or the migration should be rebuilt.
### Option 5 — add regression tests for authority changes between preview and confirmation
At minimum, add:
```
preview manager = C
reclaim C -> A
final confirmation
expected: C receives no V2 role
```
and:
```
preview manager = C
source refetch returns A
plan rebuild/confirmation
expected: stale C cannot survive
```
Also test the post-state verifier so that a role grant matching a stale plan cannot be treated as sufficient proof of authorization.
### Recommended invariant
> **An address that is no longer authorized as the V1 ENS Registry manager when the registrant confirms migration must never receive fresh V2 permissions from that migration.**
***
## References
### In-scope Manager
* `apps/manager/src/features/migration/service/buildRoleGrantCalls.ts`
* defines `ROLE_SET_RESOLVER`
* builds the role grant to `name.managerAddress`
* `apps/manager/src/features/migration/service/buildAtomicMigrationBatches.ts`
* emits the `manager-role-grant` execution
* builds the `manager-role` verification expectation
* `apps/manager/src/features/migration/service/migrationService.ts`
* migration planning
* approval/current-plan validation
* execution/retry flow
* `apps/manager/src/features/migration/service/verifyAtomicMigrationBatch.ts`
* verifies the prepared manager-role expectation
* `apps/manager/src/features/migration/hooks/useV1Names.ts`
* V1 names query
* five-minute stale time
* `apps/manager/src/features/migration/contracts/addresses.ts`
* migration contract configuration
* no V1 ENS Registry authority read in the migration contract set
### Supporting classification code consumed by Manager
* `packages/migration/src/service/classifyNames.ts`
* derives `managerAddress` from V1 `domain.owner.id`
### Relevant authorization primitives
* V1 `ENSRegistry.owner(node)`
* V1 `ENSRegistry.setOwner(node, owner)`
* V1 `BaseRegistrar.reclaim(labelhash, owner)`
* V2 `ETHRegistry.roles(resource, account)`
* V2 `ETHRegistry.setResolver(resource, resolver)`
* V2 ERC-1155 `balanceOf(account, tokenId)`
### Final PoC evidence files
* `e2e/projects/manager/tests/stale-manager-role-grant.poc.spec.ts`
* `e2e/projects/manager/playwright.stale-manager-poc.config.ts`
* `e2e/helpers/mock-v1-subgraph.ts`
***
## Proof of Concept
## PoC Classification
I implemented a repo-native **browser-to-chain Manager E2E PoC** against the frozen ENS competition code.
The final PoC uses the real:
* Manager application;
* Manager migration planning and execution flow;
* Playwright browser;
* headless wallet authorization flow;
* canonical V1 ENS Registry;
* canonical V1 BaseRegistrar;
* real `BaseRegistrar.reclaim()`;
* real V2 ETHRegistry;
* direct V2 role-bitmap reads;
* direct V2 ERC-1155 ownership reads;
* real attacker contract-creation transaction;
* real `ETHRegistry.setResolver()` transaction; and
* direct resolver invocation proving the victim name resolves to `C`.
I mock only the V1 GraphQL route because a name created on the local Anvil/Sepolia environment cannot exist in the remote production indexer.
The hardened version additionally:
1. captures the exact V1 GraphQL request bodies Manager used while preparing migration;
2. updates the mocked source to the current post-`reclaim()` state;
3. replays the exact request through the browser;
4. inspects the actual returned HTTP JSON;
5. asserts `owner.id == A`;
6. performs that assertion **before** the victim clicks final Upgrade; and
7. then proves the prepared migration nevertheless grants `C` fresh V2 authority.
The mock is therefore truth-preserving:
```
initial:
chain manager = C
served owner = C
after reclaim:
chain manager = A
served owner = A
```
The final exploit does not require a malicious or permanently stale indexer.
The local historical V1 fixture temporarily creates registration conditions that are no longer naturally available after the V2 cutover. Those local fixture operations are only test setup and do not participate in the security-sensitive exploit transition.
## PoC File
Primary PoC:
```
e2e/projects/manager/tests/stale-manager-role-grant.poc.spec.ts
```
Supporting files:
```
e2e/helpers/mock-v1-subgraph.ts
e2e/projects/manager/playwright.stale-manager-poc.config.ts
```
## Complete Hardened E2E PoC
The source below is the complete hardened browser-to-chain PoC. STEP 6 replays the captured `getNamesForAddress` request from inside the Playwright browser, inspects the actual returned HTTP JSON, extracts `owner.id`, and asserts that it is victim `A` **before** the final Upgrade click.
```ts
/**
* E2E PoC — revoked V1 manager is resurrected with fresh V2 ROLE_SET_RESOLVER
*
* Security invariant:
*
* If C is no longer the current V1 ENS Registry manager when A confirms
* migration, migration must not grant C fresh V2 permissions.
*
* Actors:
* A = BaseRegistrar registrant / victim
* C = former V1 ENS Registry manager
*
* Flow:
* 1. Create an actual unwrapped V1 .eth name owned by A.
* 2. A legitimately makes C the V1 ENS Registry manager.
* 3. Manager UI reads truthful source state and prepares migration with C.
* 4. Before final Upgrade confirmation, A calls 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 plan embeds the manager identity taken from the V1 GraphQL response and the execution-time approval check only verifies that manager restoration is required, not that the address still matches the current V1 registry owner.
Impact
A revoked former manager could gain fresh resolver authority over the victim's migrated name and redirect its resolution, though the victim retains ownership and the resolver admin role and could revoke it.
What the attacker needed
Victim is BaseRegistrar registrant; a different V1 manager at preview time; victim reclaims before confirming; victim continues open migration
The fix
The role grant should be bound to the current authoritative V1 manager by live-reading the registry owner immediately before the irreversible grant and invalidating the plan if it no longer matches.
How it was found
- Victim opens Manager and the migration preview is prepared with the current V1 manager recorded.
- Victim calls BaseRegistrar.reclaim to restore the V1 node to themselves.
- Victim returns to the still-open Manager migration within the cache window.
- Victim clicks the final Upgrade button.
- Manager grants the previously recorded manager the V2 resolver role.
- That address installs an attacker resolver and the victim's name resolves to it.
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 name is moved from the old ENS system to the new one, the app looks up who currently manages it and gives that person permission to change where the name points. The problem is that this lookup happens early, and the app never checks again at the moment the user clicks the final button. So if the user removes that manager in between, the app still hands the old manager fresh power over the name.
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.