Skip to content
Access control Audit finding Advanced

V1 v2 migration assigns the migrated name s resolver to a third party and grants them the role that keeps it

The ENS Manager's v1-to-v2 migration flow derives a 'manager' address from the subgraph as any v1 registry owner who is not the registrant, then keeps that party's custom v1 resolver and grants them ROLE_SET_RESOLVER on the migrated name. An attacker who is the stale v1 registry owner can set a malicious address record before the victim migrates, and after migration the victim cannot correct the record or reclaim, while the attacker can keep repointing the resolver.

Lun3x Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

89516 w a critical v1 v2 migration assigns the migrated name s resolver to a third party and grants them the role that keeps it

Submitted on Aug 19th 2026 at 17:45:18 UTC by @Lun3x for Audit Competition | ENS

  • Report ID: #89516
  • Report Type: Websites & Apps
  • Report severity: Critical
  • 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
    • Causing the application to display or pre-fill an incorrect address, name, or transaction detail, so that a user sends funds or submits a transaction to an unintended recipient, such as:
      • resolving or rendering an ENS name to an attacker-controlled address
      • showing the wrong recipient or amount on a transaction the user then approves
    • Malicious interactions with an already-connected wallet, such as: Modifying transaction arguments or parameters Substituting contract addresses Submitting malicious transactions Signing or submitting a transaction against the wrong chain (for example when the request's target chain is not validated) Inducing a blanket token approval (for example setApprovalForAll on the registry or NameWrapper) to an attacker-controlled address

Description

Brief/Intro

A .eth name that changed hands on v1 is normally left with its old registry owner ("manager") still in place; ENS's own docs say transferring the registrant does not update the controller, and that the registrant fixes it by calling reclaim().

When the Manager migrates such a name, three things happen inside the one flow the user is told is "migration":

{% stepper %} {% step %}

The migrated v2 name is given the resolver contract that the old manager chose

This includes the address records they already wrote there. {% endstep %}

{% step %}

The batch the user signs grants the old manager resolver authority

The batch contains grantRoles(<name>, ROLE_SET_RESOLVER, <that old manager>). {% endstep %}

{% step %}

The v1 ERC-721 leaves the user's wallet

reclaim()—the remedy that would have removed that party on v1—is gone for good. {% endstep %} {% endstepper %}

Executed today on kiln.eth, a live Sepolia name already in this state, at Sepolia fork block 11,523,380 (2026-08-19): the third party set kiln.eth's address record to 0x…dEaD, the holder migrated through the app's own plan, and UniversalResolver then answered kiln.eth → 0x000000000000000000000000000000000000dEaD through the resolver the migration installed. The holder's attempt to correct that record reverts. Their attempt to reclaim() reverts. When they do the one thing left—repoint the resolver—the granted party puts it back, and the name resolves to 0x…dEaD again.

Measured live on 2026-08-19 against https://v1-graphql.ens.dev/subgraph, sweeping the eligible population to exhaustion: of 3,121 migration-eligible unwrapped .eth 2LDs, 1,893 (60.7%) take the "keep the v1 resolver" branch, 118 would emit the role grant, and 81 are on both arms right now—kiln.eth, turnkey.eth, web3labs.eth, visionfoundation.eth, divi.eth, testdeployment.eth among them, with aragon-dao.eth on the grant arm only (its v1 resolver is one of the nine). The attacker's side costs one setResolver and one setAddr on a name they are selling: no privileged role, no contract deployment, and no victim interaction beyond the migration the victim came to perform.

The Manager never shows the address. It renders managerAddress zero times, contains no revokeRoles call, and the only copy for the step is "Approve manager restoration — Restore the existing managers for your names."

Vulnerability Details

Asset Manager app Files (apps/manager), scope entry dated 6 August 2026
Also in scope, and used packages/migration (shared package compiled into the Manager)
Repo / commit immunefi-team/audit-comp-ens @ 1c9b47f18fcddd2e864dfe385c4171061c9811ae (branch audit-comp-ready)
Deployed artifact checked app.ens.dev, 2026-08-19 — entry assets/index-CcNccUE2.js → assets/migration-CmgvIteB.js, assets/useEligibleV1Names-B5kQt4VR.js
Impact line claimed Critical — "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"

Siblings checked and ruled out. managerAddress is null on every wrapped branch of classifyName (unlocked, locked-2ld, locked-child, detached-child)—only the unwrapped .eth 2LD branch carries it, so this report is about unwrapped names only. The Explorer app (apps/portal) has no migration plan builder—only UpgradeBanner.tsx and useMigrationStatus.ts—so the defect is Manager-only. The Explorer is nonetheless where the two remedies live, which matters below.

Not the ENS contracts. Every decision in this report is made in app code: which address to grant a role to (classifyNames.ts, buildRoleGrantCalls.ts), which resolver to write into the migration data (resolverStrategyFor), and what to tell the user (nothing). The contracts execute exactly what the app asks for.

Mechanism

Three lines of app code, in the order the flow reaches them.

1. The grantee is derived, from a subgraph row, as "whoever is not the registrant"

packages/migration/src/service/classifyNames.ts, unwrapped branch:

TS
const registrant = domain.registrant
if (registrant?.id.toLowerCase() !== addr) return null       // the migrator must hold the NFT
...
const registryOwnerAddress = toAddress(domain.owner.id)      // v1 registry owner == "manager"
const managerAddress: Address | null =
  registryOwnerAddress &&
  registryOwnerAddress.toLowerCase() !== registrant.id.toLowerCase()
    ? registryOwnerAddress
    : null

The condition is "this address is not the person migrating". That is the same condition as "this name was transferred and never reclaimed".

2. The resolver the same party chose is kept

Same file:

TS
if (v1ResolverAddress && !isKnownPublicResolver(v1ResolverAddress)) {
  return 'keep-v1'
}

isKnownPublicResolver compares against nine hard-coded addresses (packages/migration/src/contracts/knownResolvers.ts). One address that is not among them—0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5—is the resolver used by 1,613 of the 3,121 eligible names, which is why keep-v1 is the majority branch rather than an edge case. The v1 resolver pointer is set with ENSRegistry.setResolver, i.e. by the v1 registry owner—the party from step 1, not the registrant who migrates.

3. The grant is added to the signed batch and treated as a success criterion

apps/manager/src/features/migration/service/buildRoleGrantCalls.ts:

TS
const ROLE_SET_RESOLVER = 1n << 24n
export const buildRoleGrantCall = (name: ClassifiedName): Call => ({
  to: V2_CONTRACTS.ETHRegistry,
  data: encodeFunctionData({
    abi: ETH_REGISTRY_V2_ABI, functionName: 'grantRoles',
    args: [labelToCanonicalId(name.label), ROLE_SET_RESOLVER, name.managerAddress],
  }),
  value: 0n,
})

buildAtomicMigrationBatches.ts:608-625 pushes it as an inner execution and adds a verificationExpectations entry, so the app checks afterwards that the third party really did receive the role.

The authority that lets the grant land is the step the user is shown: "Approve manager restoration" is ETHRegistry.setApprovalForAll(hca, true) (migrationApprovals.ts, approval id eth-registry:hca). Without it the same grantRoles call reverts 0xd1a3b355; with it, it succeeds.

The grantee is never re-read on chain. It comes from the subgraph row the plan was built from. There is no ENSRegistry.owner(node) read anywhere in the Manager's migration path (grep -rn "ensLegacyRegistry" over apps/manager/src/features/migration and packages/migration/src → no hits, while the same grep finds it in the Explorer's V1NameManagerRecord.tsx). A buyer who learns about the stale manager, calls reclaim() elsewhere, and comes back to the open Manager tab still signs the grant to the old address.

Executed sequence

One live name, nothing planted before step 1, every value read off the fork. Full transcript and commands in the Proof of Concept section.

# who acts action state after
0 — read live state kiln.eth: registrant 0x3e8983d0…2303, v1 registry owner 0xbd55D3bB…a90a, v1 resolver 0xE99638b4…49b5, v2 status 1 (migratable). UniversalResolver: kiln.eth → 0x3e8983d0…2303
1 third party (v1 registry owner) setAddr(node, 0x…dEaD) on that resolver status 0x1; record is now the attacker's. Controls: the same call from the registrant reverts; from an unrelated address reverts
2 holder (registrant) migrates — safeTransferFrom to UnlockedMigrationController with the app's own migration data, whose resolver field is the app's keep-v1 value 0xE99638b4…49b5 status 0x1; v2 owner = holder; v2 resolver = 0xE99638b4…49b5; UniversalResolver: kiln.eth → 0x…dEaD via 0xE99638b4…49b5
3 holder tries to correct the record; tries reclaim() both revert. v1 ERC-721 and v1 registry ownership are now 0xF83Fe265…4750 (a contract, neither party). The hostile record is frozen in place
4 holder's HCA the batch's manager-role-grant, byte-for-byte as the app builds it status 0x1; hasRoles(resource, 1<<24, 0xbd55D3bB…a90a) == true
5 holder repoints the v2 resolver to their own status 0x1, resolver fixed
6 third party setResolver using the granted role status 0x1; resolver back to 0xE99638b4…49b5; kiln.eth → 0x…dEaD again. Control: the same call from an address with no role reverts 0x4b27a133 (EACUnauthorizedAccountRoles)
7 holder revokeRoles, then repoint both succeed, and the third party's repoint then reverts. This is the only effective remedy, and it is two transactions in a different app

There is no race in this and no timing margin to state: step 1 can be done at any point before the victim migrates, and steps 4–6 are available indefinitely afterwards.

The state also arises with no attacker. 118 live names are in it today because their owners transferred the registrant and never reclaimed. And it is trivially plantable: a seller points the v1 registry owner at a burner they keep, then sells the NFT—executed, both halves, in the PoC.

Why it does not self-correct

  • The record cannot be fixed at the resolver. After migration, write authority on 0xE99638b4…49b5 for that node belongs to the v1 registry owner, and the migration moved that to 0xF83Fe265…4750. Executed: the holder's setAddr reverts (step 3).
  • The v1 remedy is destroyed by the flow itself. reclaim() requires holding the v1 ERC-721. The migration transfers it away. Executed: reverts (step 3). This is the one point where the app makes a repairable v1 misconfiguration permanent—before migration, one reclaim() would have ended it.
  • The remaining remedy is undone by the grant. Executed, steps 5 and 6: repoint, and the granted party repoints back.
  • The remedy that works needs two steps in a different app. revokeRoles first, then repoint. grep -rn "revokeRoles" apps/manager/src → no hits. The Manager cannot undo what it granted. Both live in the Explorer's roles page.

Why nobody noticed

  • The value has no rendered surface in the Manager. grep -rn managerAddress apps/manager/src --include=*.tsx → one hit, a test fixture set to null. The only thing derived from it for the UI is the boolean requiresManagerRestoration, which selects an approval step whose descriptor is { type: 'approval', approvalId: 'eth-registry:hca' }—a shape with no field that could carry an address. Rendered and asserted, not only grepped: the select step and the confirmation dialog were mounted with a name whose managerAddress is set, and neither contains the address in full or truncated form.
  • The wallet prompt for that step shows setApprovalForAll, not the grant. The grant is one inner call inside the batched migration signed afterwards.
  • The one place it could be seen after the fact is the Explorer's roles table, which rebuilds holders by replaying EACRolesChanged scoped to the registry with MAX_EVENTS = 1000 (apps/portal/src/features/roles/hooks/useNameRoleAccounts.ts:50; k=1e3 in the deployed useNameRoleAccounts-DZoB1-ZW.js). ETHRegistry is shared by every .eth 2LD, so that budget is registry-wide: a paginated sweep of that registry on staging-graphql.ens.dev—the endpoint both deployed apps compile in—returns 2,559 such events today against the window of 1,000 (control: the same query on graphql.ens.dev, the other deployment, returns 0). A grant is visible immediately after migration and ages out as other names' role events accumulate. And RolesSidebar.tsx:84 takes the revoke target from the selected table row (const selectedAccount = row?.original.account), so a holder with no row cannot be removed in-app at all.

Not a duplicate of the published known issues

Stated plainly because a reviewer will find it:

  • packages/migration/src/service/classifyNames.test.ts:105 — "unwrapped 2LD: keeps custom v1 resolver, flags manager when registry owner differs" — asserts both behaviours, and buildRoleGrantCalls.test.ts:12 asserts the grant targets ETHRegistry with ROLE_SET_RESOLVER. Both derivations are intended. This report is not that the derivation is a coding error; it is that the intent ("restore the manager the owner delegated to") and the condition the code actually tests ("this address is not the person migrating") are not the same set, that the difference is exactly the post-sale and attacker-planted case, and that the flow neither discloses the grant nor provides a way to remove it.
  • Your known-issues register, Part 2, states the carve-in this report relies on: "a demonstrated security consequence of one of them (for example, a role combination that grants authority it should not, rather than merely erroring) goes beyond the known breakage and is a new finding."
  • No entry in the register covers migration, role grants, managerAddress, or the resolver strategy. The Manager entries are SEC-MGR-003, SEC-MGR-008/011, SEC-MGR-010; R3-01…R3-08 are transaction-manager liveness and data-integrity defects; R2-03/R2-06 are the session key; EXP-4337-002/003 are transport chainId and request.from. QA-01 and WEB-1305/WEB-1257 concern role combinations during transfer, which is a different flow and a different code path.
  • Nothing here depends on a label being un-normalized, so it shares no root cause with the normalization reports filed separately in this competition. kiln normalizes to itself.
  • No vendor source names this mechanism as of 2026-08-19: no issue, PR, commit, doc page or audit entry reachable from ensdomains/* or this repo's history describes the migration re-granting the v1 manager or preserving its resolver. This repo is a squashed fork with three commits and the upstream apps-monorepo is private, so the search that is possible is the public one plus your own register.

Impact Details

Critical — "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."

The match is on the words: the flow is v1→v2 migration, the assignment is the resolver, the assignee is a party who is not the owner, and it is the owner's own transaction that does it. Executed end to end above.

Two further published Critical lines describe the same executed facts; I claim the migration line as the primary because it is the narrowest fit, and name these so the impact is not undercounted:

  • "Causing the application to display or pre-fill an incorrect address … such as: resolving or rendering an ENS name to an attacker-controlled address" — after step 2, UniversalResolver answers kiln.eth → 0x…dEaD.
  • "Malicious interactions with an already-connected wallet, such as: Modifying transaction arguments or parameters" — state the attacker plants adds grantRoles(…, attacker) to the batch the connected wallet signs.

Band. Program severity is set by impact type, with the amount at risk placing the payout inside the tier. This deployment is Sepolia, so there is no dollar figure to quote and I do not invent one. What sets the band:

  • The addressable set is every name that migrates through this flow. Today, exhaustively measured: 3,121 eligible names, 1,893 on the resolver branch, 118 on the grant branch, 81 on both. Migration is not an optional feature—it is the one path a v1 holder takes to v2, so the denominator is the whole v1 population over time, not a sampled feature's traffic.
  • Attacker cost is two ordinary transactions on a name they already hold, before selling it. No privileged role, no contract, no user interaction beyond the migration itself.
  • The same code is the migration path that will run at mainnet launch. I did not measure the mainnet v1 population and do not claim a mainnet figure.

Exclusions checked. Not a leaked key or credential. Not a privileged address—the v1 registry owner is an ordinary user-level role, and the impersonations in the PoC are of parties that already hold what they use (registrant, registry owner, an approved operator). Not a test or configuration file. Not theoretical: executed on a fork of live Sepolia with three one-variable controls. Not an un-prompted action outside the normal workflow—migration is the workflow. Not the ENS contracts, subgraph or metadata service: the defect is which address the app grants a role to, which resolver it writes, and what it tells the user. Not a UI-only impact: the resulting state is on chain.

Precedent. ENS's own documentation is the closest published reference point, and it is on the mechanism rather than the severity: transferring the registrant does not update the controller, and the registrant's remedy is reclaim() (.eth Permanent Registrar). This report is that the migration consumes that stale value as an authority and removes the remedy.

Scope of the claim

Which bullet is claimed. The holder retains ROLE_SET_RESOLVER_ADMIN, so revokeRoles followed by a repoint does end the capture—executed at step 7. The third bullet of the Critical migration line, "leaving a name permanently inaccessible after the flow", is therefore not the bullet claimed here. The bullet claimed is the first, "a migration that assigns the name, its ownership, registry, or resolver to an attacker", which is exactly what steps 2 and 4 execute.

The asymmetry is the point: the capture is produced by the flow the holder came to use, in one signature, with no disclosure. Undoing it requires the holder to first discover that a role was granted at all—from a Manager that renders the grantee zero times and contains no revokeRoles, via an Explorer roles table that cannot list the grantee once 1,000 registry-wide role events have accumulated (2,559 exist today) and whose revoke control reads its target from a table row that therefore does not exist.

Two smaller concessions:

  • The pre-migration redirect is v1 registry behaviour; the PoC shows it at step 1 and this report does not count it as impact. What the flow adds, and what is counted, is carrying that value into v2 as the migrated name's resolver, destroying reclaim() in the same transaction, and granting the role that defeats the only remaining fix.
  • A deliberate registrant/manager delegation and a name sold without reclaim() are indistinguishable to classifyNames.ts: the condition it tests is "this address is not the person migrating", which is true of both. The flow grants resolver authority on the strength of that condition alone, and shows the user neither the address nor the grant.

References

  • packages/migration/src/service/classifyNames.ts:163-167 — managerAddress = v1 registry owner when it differs from the registrant
  • packages/migration/src/service/classifyNames.ts:65-89 — resolverStrategyFor, the keep-v1 branch
  • packages/migration/src/contracts/knownResolvers.ts — the nine-entry allowlist; 0xE99638b4…49b5 is absent
  • apps/manager/src/features/migration/service/buildRoleGrantCalls.ts — ROLE_SET_RESOLVER = 1n << 24n, grantRoles(resource, ROLE_SET_RESOLVER, name.managerAddress)
  • apps/manager/src/features/migration/service/buildAtomicMigrationBatches.ts:610 — phase: 'manager-role-grant' and its verificationExpectations entry
  • apps/manager/src/features/migration/service/migrationApprovals.ts — approval id eth-registry:hca, the "Approve manager restoration" step
  • apps/manager/src/features/migration/components/WalletConfirmationStepsDialog.tsx:84,87 — the only copy shown for that step
  • apps/manager/src/features/migration/components/GameStep.tsx:137 — the same copy in the progress line
  • apps/portal/src/features/roles/hooks/useNameRoleAccounts.ts:50,89 — MAX_EVENTS = 1000, applied registry-wide
  • apps/portal/src/features/roles/components/RolesSidebar.tsx:84 — revoke target read from the selected table row
  • apps/portal/src/features/ownership/components/V1NameManagerRecord.tsx — the only place the v1 registry owner is read on chain
  • packages/migration/src/service/classifyNames.test.ts:105, buildRoleGrantCalls.test.ts:12 — the project's own assertions on both derivations
  • Sepolia: v1 ENSRegistry 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e, v1 BaseRegistrar 0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85, v2 ETHRegistry 0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2, UnlockedMigrationController 0x2FCf83232b93bD29C59dB18AaA1D4b62e9f9FC73, UniversalResolver 0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe
  • ENS docs, .eth Permanent Registrar — transferring the registrant does not update the controller; the registrant's remedy is reclaim()

Proof of Concept

Everything below was executed on 2026-08-19. All chain writes are on a local Anvil fork of Sepolia; nothing was written to a live network. Read-only calls are against public endpoints.

0. Setup

Bash
git clone --branch audit-comp-ready https://github.com/immunefi-team/audit-comp-ens repo
cd repo && pnpm install                      # node 22, pnpm 10
foundryup                                    # anvil + cast 1.7.1 used here

Pinned facts, all confirmed on live Sepolia today:

v1 ENSRegistry                 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
v1 BaseRegistrar (.eth)        0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85
v2 ETHRegistry                 0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2
v2 UnlockedMigrationController 0x2FCf83232b93bD29C59dB18AaA1D4b62e9f9FC73
UniversalResolver (answering)  0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe

subject   kiln.eth
  v1 ERC-721 registrant        0x3e8983d0df94f7AF2f830eB5E49d10917dB92303
  v1 registry owner (manager)  0xbd55D3bB25Ac799d3E463b6945C570045aC1a90a
  v1 resolver                  0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5
  v2 status                    1   (reserved -> migratable)

Verify that state yourself:

Bash
R=https://ethereum-sepolia-rpc.publicnode.com
cast call 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e 'owner(bytes32)(address)' \
  $(cast namehash kiln.eth) --rpc-url $R                      # -> 0xbd55D3bB…a90a
cast call 0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85 'ownerOf(uint256)(address)' \
  $(cast to-dec $(cast keccak kiln)) --rpc-url $R             # -> 0x3e8983d0…2303
cast call 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e 'resolver(bytes32)(address)' \
  $(cast namehash kiln.eth) --rpc-url $R                      # -> 0xE99638b4…49b5

A. Who can write this name's records today — live, no fork, no state change

eth_call from three different senders. This is the fact the rest rests on: the party who can write kiln.eth's address record is not the party who holds it.

Bash
R=https://ethereum-sepolia-rpc.publicnode.com
RES=0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5
NODE=$(cast namehash kiln.eth)
D=0x000000000000000000000000000000000000dEaD

cast call --from 0xbd55D3bB25Ac799d3E463b6945C570045aC1a90a $RES \
  'setAddr(bytes32,address)' $NODE $D --rpc-url $R     # v1 registry owner  -> 0x   (succeeds)
cast call --from 0x3e8983d0df94f7AF2f830eB5E49d10917dB92303 $RES \
  'setAddr(bytes32,address)' $NODE $D --rpc-url $R     # the actual holder  -> execution reverted
cast call --from 0x000000000000000000000000000000000000c0Fe $RES \
  'setAddr(bytes32,address)' $NODE $D --rpc-url $R     # unrelated address  -> execution reverted

B. The app's own plan, on live rows — 5 assertions, 4 real names + a control

Drop __poc_live_both_arms.test.ts (reproduced at the end of this section) into apps/manager/src/features/migration/service/ and run:

Bash
pnpm --filter manager exec vitest run \
  src/features/migration/service/__poc_live_both_arms.test.ts --silent=false --reporter=verbose

It fetches each name with the app's own document from https://v1-graphql.ens.dev/subgraph, runs the app's classifyName with the real registrant as the connected wallet, runs buildAtomicMigrationBatches, and decodes every grantRoles call in the result.

kiln.eth
  registrant (migrator) : 0x3e8983d0df94f7af2f830eb5e49d10917db92303
  v1 registry owner     : 0xbd55d3bb25ac799d3e463b6945c570045ac1a90a
  v1 resolver           : 0xe99638b40e4fff0129d56f03b55b6bbc4bbe49b5
  resolverStrategy      : keep-v1
  migrationData.resolver: ["0xe99638b40e4fff0129d56f03b55b6bbc4bbe49b5"]
  managerAddress        : 0xbd55d3bb25ac799d3e463b6945c570045ac1a90a
  grant                 : [{"data":"0x7c300586e14221b18cb7f147f37f4ae0c36bc02a9acf61b015bb1c8e256852020000
                            000000000000000000000000000000000000000000000000000000000100000

The original report as published on Immunefi, by Lun3x. 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 code treats 'v1 registry owner differs from registrant' as proof of a legitimate manager to restore, without re-reading on-chain ownership, disclosing the grantee, or offering a revoke path.

Impact

A migration can assign the name's resolver to a third party and grant them the role to keep it, so the name resolves to an attacker-controlled address and the holder cannot fix it from the Manager; the holder retains ROLE_SET_RESOLVER_ADMIN, so the name is not permanently bricked.

What the attacker needed

Victim holds an unwrapped .eth 2LD on v1; v1 registry owner differs from registrant; victim migrates through the Manager; attacker controls the stale v1 registry owner

The fix

The migration should re-read the v1 registry owner on chain, disclose the grantee to the user, and either not grant ROLE_SET_RESOLVER to a stale manager or provide a revoke path in the Manager.

How it was found

  1. The third party who is the v1 registry owner sets an address record on the custom v1 resolver to an attacker-controlled address.
  2. The registrant migrates the name through the Manager, whose migration data keeps the v1 resolver.
  3. After migration the name resolves to the attacker's address, and the holder's attempts to correct the record or call reclaim revert.
  4. The holder's batch executes the manager-role-grant, giving the third party ROLE_SET_RESOLVER.
  5. The holder repoints the v2 resolver to their own, and the third party uses the granted role to set it back.
  6. The holder revokes the role and repoints, which is the only effective remedy and lives in a different app.

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 an ENS name is sold, the old owner can remain recorded as the 'manager' on the older v1 system unless the new owner explicitly clears them. This report shows the migration tool reads that leftover manager, keeps the resolver (the contract that answers 'what address does this name point to') that the old manager chose, and even gives that old manager permission to change the resolver later. So a buyer migrating their name can end up with a name that points wherever the previous owner wants, and the tool never tells them.

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 Lun3x

View all

5 more disclosed reports, 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.