Skip to content
Access control Audit finding Advanced

A direct registry url applies registry bit 0 to a resolver and grants address control

The ENS Portal's registry roles route treats any address returned by indexer discovery as a Registry without verifying the contract implementation behind it. An attacker can place a victim's PermissionedResolver in a decoy name's subregistry field so the route renders Registry permission labels, then a single victim approval of the apparently narrow 'Registrar' bit 0 actually grants resolver-wide address-writing authority, letting the attacker redirect the victim's name records.

yaohao159123 Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

92112 w a critical a direct registry url applies registry bit 0 to a resolver and grants address control

Submitted on Sep 7th 2026 at 09:15:17 UTC by @yaohao159123 for Audit Competition | ENS

  • Report ID: #92112
  • Report Type: Websites & Apps
  • Report severity: Critical
  • Target: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/portal
  • Impacts:
    • 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

An attacker does not need to deploy a malicious contract, persuade the victim to paste an address, or race a transaction. The attacker needs one ordinary .eth registration and a contract-type confusion already present in ENS Portal.

The attacker publicly registers a decoy name through ETHRegistrar, gives that name to the victim, and places the victim's legitimate Portal-deployed PermissionedResolver P in the decoy's subregistry field. Registry discovery and indexer materialization reduce P to a bare address. The attacker then sends the victim Portal's public /registry/P/roles URL directly. That route treats the address as a Registry without verifying the implementation behind it, renders Registry permission labels, enables Add User, and builds a transaction for the selected Registry role.

That last step crosses a semantic boundary hidden from the victim. Bit 0 means ROLE_REGISTRAR ("Registrar / Can register new labels") on an ENSv2 Registry, but the same bit means ROLE_SET_ADDR on a PermissionedResolver. Both contract types accept the same EnhancedAccessControl entrypoint, grantRootRoles(uint256,address). The victim therefore selects only the apparently narrow Registrar permission and confirms once, while Portal sends grantRootRoles(1, attacker) to P. The call succeeds and gives the attacker resolver-wide address-writing authority. Before the grant the attacker has no role and cannot call setAddr; after it, the attacker redirects the victim's real vladz.eth record to an attacker-controlled address.

The vulnerability is the Portal's wrong-schema authorization: it presents one capability but commissions another by binding Registry semantics to an unverified contract address. The effect is a proven capability transition from false to true, not a harmless label error and not generic untyped routing.

Vulnerability Details

The security invariant is simple: the permission vocabulary shown to a user must describe the capabilities implemented by the contract that will receive the transaction. An address is not a contract type. When multiple EnhancedAccessControl contracts share a selector and bitmap positions but assign different powers to those positions, the application must verify the target's contract kind before it renders a role or prepares a grant. Portal instead lets discovery and indexer classification stand in for that verification.

The attacker journey exploits each state transition produced by that design: choose a semantic collision, place the victim's resolver into a public discovery path, let Portal erase its type, induce one normal Add User action, and exercise the broader resolver capability that the transaction actually created.

Select the semantic collision

The attacker chooses bit 0 because the user-facing meaning and the executed meaning diverge while the call interface remains valid:

Property ENSv2 Registry shown by Portal PermissionedResolver targeted by Portal
bit 0 user role ROLE_REGISTRAR - "Registrar / Can register new labels" ROLE_SET_ADDR - write any name's address record
bit 0 admin variant ROLE_REGISTRAR_ADMIN (bit 128) ROLE_SET_ADDR_ADMIN (bit 128)
grant entrypoint grantRootRoles(uint256,address) grantRootRoles(uint256,address)
shared selector 0x072d5d77 0x072d5d77

This is why the wrong-schema transaction does not revert. Registry code and resolver code agree on how to decode the call, but disagree on what bitmap 1 authorizes. Portal labels the choice with the Registry definition; P enforces the PermissionedResolver definition.

The contracts establish the consequence but are not the reported defect. ENSv2 RegistryRolesLib.sol defines Registry bit 0 as ROLE_REGISTRAR; PermissionedResolverLib.sol defines resolver bit 0 as ROLE_SET_ADDR; PermissionedResolver.sol requires ROLE_SET_ADDR to write address records; and EnhancedAccessControl.sol provides the common grant sink. The vulnerable trust decision and minimum repair both sit in the in-scope Portal.

A separately executed variant confirms that the schema substitution is not confined to bit 0. Portal also offers ROLE_REGISTER_RESERVED as "Register Reserved"; frozen ENSJS 5.0.0-alpha.1 maps it to bitmap 16 and, when executed with root resource zero, returns grantRootRoles(16, attacker) for P. In PermissionedResolverLib.sol, bitmap 16 is ROLE_SET_TEXT. A local EVM test deployed the real PermissionedResolver behind its real proxy factory: the attacker could not call setText before the Portal-shaped grant, acquired root ROLE_SET_TEXT from that grant, and then wrote the text value successfully. The primary report remains the stronger bit-0 address redirect, while this different selected role supplies independent runtime confirmation of the same unverified-schema root cause.

Materialize the target and use the direct Registry URL

The starting state is legitimate: the victim owns vladz.eth, uses Portal-deployed PermissionedResolver P, and received the all-roles admin bitmap when Portal's normal Change Resolver flow initialized P. The attacker starts with no role on P.

The attacker then prepares the route entirely through public operations over attacker-funded assets:

  1. Register an ordinary decoy .eth name with the public ETHRegistrar.commit() / register() flow.
  2. Set the victim as the decoy's owner and P as its subregistry. The public registrar permits a nonzero third-party owner and an arbitrary nonzero subregistry address, and the ETH Registry stores that pointer and emits SubregistryUpdated without checking the target's contract type.
  3. Let Universal Resolver registry discovery (findRegistries) include the bare address P in the decoy's registry ancestry.
  4. Let the ENSv2 indexer follow its documented heuristic that a new address observed through SubregistryUpdated indicates a dynamically deployed registry and consequently materialize P as a registry.
  5. Send the victim Portal's direct /registry/P/roles URL and ask the victim to add the attacker as an operator for the gifted decoy, presenting the request as ordinary delegated administration of the newly delivered name.

The victim opens the direct URL inside Portal. The destination calls P a "PermissionedRegistry," renders Registry permissions, and enables Add User because the victim genuinely holds bit-128 admin authority on P. The victim enters the attacker address, selects only "Registrar / Can register new labels," and confirms once. The hash-verified frozen route was executed with three local query states: before materialization it returned Registry not found; after a row for P existed and the caller held the admin bit, it rendered the roles table and enabled Add User with both components bound to P; with the same row but a non-admin caller, it withheld Add User.

The discovery half cannot be replaced with a resolver-only pointer. A local EVM experiment ran the real LibRegistry.findRegistries against identical decoy.eth trees. With P only in getResolver("decoy"), ancestry element zero was the zero address; with P in getSubregistry("decoy"), element zero was P. The public decoy must remain subregistry-driven, but navigation after materialization can be direct.

Portal submits P.grantRootRoles(1, attacker). P interprets bit 0 as ROLE_SET_ADDR, so the attacker can immediately call setAddr(namehash(vladz.eth), attackerAddress). The genuine name then resolves to the attacker.

No step requires a victim-pasted contract address, Retry sequence, failure or revert in the victim flow, transaction race, attacker-deployed resolver, compromised key, or pre-existing attacker permission. Registration is attacker preparation; the victim-side trigger is one documented Add User operation and one successful wallet approval. The final redirect needs no further victim action.

Let the route erase the target's contract type

The exploitable trust boundary starts when a typed PermissionedResolver becomes an address and ends when that address receives calldata constructed from the Registry schema:

  1. apps/portal/src/features/registry/hooks/useNameRegistryDiscovery.ts:56 calls ENSJS registry discovery in getNameRegistries and returns addresses without an implementation, interface, or contract-kind field.
  2. After materialization, the public /registry/$address/roles route accepts that same bare address as its only target identifier; the URL carries no implementation or contract-kind binding.
  3. apps/portal/src/routes/registry/$address/roles.tsx:31 uses getRegistryInfo(address) as its complete type gate. A returned indexer row is enough to treat the target as a Registry. The requested RegistryInfo fields at apps/portal/src/features/registry/hooks/useRegistry.ts:39 are address, name, namehash, parentRegistry, createdBlock, and createdAt; none proves an implementation or contract kind.
  4. The route checks Registry ROLE_REGISTRAR_ADMIN against the untyped target at line 40 and enables Add User at line 77. apps/portal/src/features/registry/hooks/useRegistryRoles.ts:47 reads role rows for the same address and decodes them using Registry vocabulary.
  5. apps/portal/src/lib/roles/permissions.ts:93 presents bit 0 as Registrar with Can register new labels. apps/portal/src/features/registry/components/v2/RegistryAddUserSheet.tsx renders that Registry schema and snapshots { account, roles } for submission.
  6. apps/portal/src/features/registry/helpers/grantRegistryRoles.ts:45 fixes the resource to ROOT_RESOURCE = 0n; line 80 sets to to the unverified route address.
  7. The pinned ENSJS implementation maps resource zero to functionName: 'grantRootRoles' with args: [roleBitmap, account] at node_modules/@ensdomains/ensjs/src/actions/wallet/v2/grantRoles.ts:49,53. It maps ROLE_REGISTRAR to 1n << 0n at node_modules/@ensdomains/ensjs/src/utils/v2/roles/registryRoles.ts:2.

The attacker-controlled data reaches the authority-changing sink as follows:

typed PermissionedResolver P
  -> attacker places P in a public subregistry field (real ETHRegistrar register)
  -> indexer lists bare P as a registry
  -> victim opens /registry/P/roles directly; route applies the Registry role schema
  -> UI offers bit 0 as "Registrar / Can register new labels"
  -> Portal sends grantRootRoles(1, attacker) to P
  -> P interprets bit 0 as ROLE_SET_ADDR
  -> attacker setAddr(vladz.eth) succeeds; genuine victim name redirected

At no point between discovery and transaction construction does Portal restore or verify the lost type information. The indexer row determines presentation, the route address determines the recipient, and the Registry bitmap determines the calldata.

Walk past a resolver check that already exists

Portal already knows how to identify this exact target type. apps/portal/src/features/resolver/hooks/useIsPermissionedResolver.ts reads the EIP-1967 implementation slot 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, decodes it, and compares the result with the known ensPermissionedResolverImpl address.

Resolver-facing application paths use that implementation-aware check: apps/portal/src/routes/$name/resolver.tsx, ResolverCard.tsx, ResolverType.tsx, useCanEditRecords.ts, and useResolverName.ts. The worker has the same protection in apps/portal/src/worker/ens.ts:92-123 through fetchIsPermissionedResolver, using the same slot and comparison.

The Registry roles route never invokes it. apps/portal/src/routes/registry/$address/roles.tsx renders Registry labels and enables the grant without asking whether $address is a PermissionedResolver. In the reproduced run, the target's EIP-1967 implementation equals the known resolver implementation, so the existing check would have identified it. Applying that check, or an equivalent supported-implementation/interface verification, before Registry presentation and actions is the minimum targeted fix.

Convert an indexing hint into a transaction authorization

Official indexing documentation in docs/indexing-ensv2-events.md describes SubregistryUpdated with this exact sentence: "New subregistry addresses indicate dynamically deployed UserRegistry contracts for subnames." The word "indicate" describes a watch-list heuristic, not proof that every observed address implements a Registry. The document uses symmetric indication language for ResolverUpdated and PermissionedResolvers.

Even if an indexer classified every address accurately, the Portal-side defect would remain: Portal's discovery result contains only addresses; the app creates /registry/<address>/roles itself; the route requests no contract-kind proof; and the transaction builder does no on-chain verification before applying Registry semantics. Here, a heuristic row becomes the entire authorization to display and transact with the Registry schema. The in-scope application must enforce the type boundary rather than treating indexing reachability as certification.

Run the attack against the frozen Portal

The reproduced chain used the clean audit-comp-ready Portal revision 1c9b47f18fcddd2e864dfe385c4171061c9811ae and real deployed ENSv2 contracts on a local Anvil Sepolia fork. The fork was pinned at block 11600064 and used chain ID 11155111. No public Sepolia transaction was broadcast; the verifier also queried a public archive endpoint and confirmed the register hash was absent.

The target P was the real PermissionedResolver proxy 0xa9a5c3bf02eac02ac6e0e5e4ecb5ea3e4d631308, whose EIP-1967 implementation was 0x9eae5c2730a7dd16bdd1dee6421a1b91e3b0365e.

Four attacker-key-signed setup transactions exercised the actual public ingress: USDC mock mint, ETHRegistrar approval, commit() transaction 0x83c00af318d9325ad8a99d21a5150fd44cf872b7e7bde8ca97255d4e877379b3 at block 11600067, and register() transaction 0x40d81e38bc0c134e40619ec49b34e3e657f475a182d8037da32cd940ce32c8d7 at block 11600069. Registration created the fresh victim-owned decoy with P as subregistry and resolver, emitting NameRegistered and SubregistryUpdated.

Starting from a fresh database, the pinned ENSv2 indexer replayed naturally from the v2 deployment block through 11533026, including the victim's historical root-role rows. A backup was taken and a disclosed cursor-only checkpoint advance changed only three sync/index cursors, with zero manual row inserts. The unmodified binary then processed the registration block and materialized P as a registry. Because its API schema predates the frozen Portal schema, a read-only compatibility adapter served getRegistryInfo and getRegistryRoles directly from the materialized SQLite database. That adapter is not claimed as primary reachability evidence; the indexer's database write is.

The direct-route run used Node v22.23.2, esbuild 0.28.1, Foundry 1.7.1, Solc 0.8.35, and an ephemeral local Anvil chain. It executed the hash-verified Portal route and actual ENSJS builder against one locally deployed real PermissionedResolver proxy. Direct /registry/P/roles navigation enabled Add User after an injected materialized row; the displayed Registrar / Can register new labels selection made ENSJS produce grantRootRoles(1, attacker) and calldata beginning 0x072d5d77. That exact calldata was sent from the local admin account and mined successfully as transaction 0xfa55eeedce4b46f030622fe6cc37adf6531e4c02e4e164623f2b224c16eea48d. Before the grant, attacker setAddr reverted and addr(victim.eth) was zero. After the grant, the attacker held root ROLE_SET_ADDR, sent successful transaction 0x18513b5499e1cc27816b273fc4e8a76da95800abb90c39b755cadd4f732e0147, and changed the resolver output to the attacker address. A separate verifier passed 20/20 links across the route target, Add User target, ENSJS output, mined input, receipts, signer, role delta, and final resolver output. The bit-4 ROLE_SET_TEXT run remains supporting evidence only. No public-chain request was made.

Bound what the evidence does and does not show

  • The proof is an explicitly segmented composition: real attacker-signed ETHRegistrar ingress and indexer materialization establish the precondition; the self-contained PoC embedded below then executes the direct Registry URL, the ENSJS builder, the local grant, and the attacker write. It is not presented as an uninterrupted production-indexer lifecycle.
  • Natural indexer replay reached block 11533026 before a consistent backup and the cursor-only advance. Only three cursors changed, there were no manual row inserts, and the unmodified indexer processed the actual registration block.
  • A staging indexer cannot ingest a local fork event by construction. No public Sepolia writes occurred, and the public-Sepolia negative control found no register transaction.
  • The victim intentionally adds the attacker as operator of a gifted decoy; this social premise is required and is not hidden.
  • A legitimate root admin can revoke the role and repair the address record after detection. That affects severity assessment but does not prevent the wrong grant or the immediate redirect.
  • The PoC's victim signature is mediated by the target-provided mock wallet using an impersonated local-fork account. The captured wallet-request bytes, which exactly match the mined input, are the evidence.
  • The contracts and indexer serve only as consequence and reachability oracles. The defect and minimum fix are in Portal.
  • The direct-route/bit-0 proof is segmented and bounded. The Portal component receives an injected materialized row rather than a live indexer response, but the actual ENSJS calldata is then sent to the same locally deployed PermissionedResolver proxy and both wallet transactions have successful receipts. It proves the address-writing impact without being described as a continuous production browser-to-indexer run.

These boundaries avoid attributing production behavior to a fork or compatibility adapter while retaining the proven application decision: the real Portal produced and completed the resolver grant after showing the victim a Registry permission.

Stop the exploit at the schema boundary

  1. Verify the target contract kind on the Registry roles route before showing Registry vocabulary or enabling Registry actions. At minimum, call the existing implementation-aware useIsPermissionedResolver check and reject a known resolver implementation; preferably allow only verified supported Registry implementations or a Registry-specific interface.
  2. Preserve a typed contract-kind/schema identity across ENSJS findRegistries, the indexer RegistryInfo model, route state, and transaction construction instead of collapsing the target to a bare address.
  3. Refuse transaction preparation whenever the verified target schema differs from the permission vocabulary displayed to the user.
  4. Add a regression test that routes a PermissionedResolver through registry discovery and proves Registry labels and actions are absent and grantRootRoles cannot be prepared through a Registry flow.

The first control blocks the demonstrated path at its narrowest application boundary; the remaining controls keep the same type confusion from reappearing elsewhere in the dataflow.

Impact Details

Selected Websites & Applications impact rows:

  • Primary (Critical): Malicious interactions with an already-connected wallet, such as: Modifying transaction arguments or parameters / Substituting contract addresses / Submitting malicious transactions. Portal presents the narrow Registry permission "Registrar / Can register new labels," but its unverified target selection makes the corresponding bitmap execute as resolver-wide Set Address authority. The connected wallet receives one Portal-built grantRootRoles(1, attacker) transaction to a PermissionedResolver. By substituting an entire role schema, the application changes the decisive authorization semantics relative to its own display and submits the broader grant.
  • Secondary: 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. The displayed permission says Registrar while the target interprets the submitted bit as Set Address. Both the represented capability and the contract-type premise behind the transaction detail are materially wrong.

The measurable impact is new attacker authority, not merely confusion. Before the victim acts, the attacker has no bit-0 role and setAddr reverts. Portal's one successful transaction changes ROLE_SET_ADDR from false to true. The attacker then redirects the victim's genuine vladz.eth to an attacker-controlled address while Universal Resolver continues to use P. Because the grant is at P's root resource, every name covered by that resolver's root scope is exposed; the authority is not limited to the decoy shown to the victim.

Severity is Critical. The report does not claim irreversible loss: once the compromise is noticed, a legitimate root admin can revoke the role and restore the record. Reversibility does not stop the immediate capability grant, does not warn the user before confirmation, and does not require the attacker to obtain any further victim interaction before redirecting records.

References

Scope, source, and public-state links below returned HTTP 200 when verified on 2026-09-01:

The public-state refresh on 2026-09-01 found audit-comp-ready at 1c9b47f18fcddd2e864dfe385c4171061c9811ae through git ls-remote https://github.com/immunefi-team/audit-comp-ens. This is the exact PoC revision. The only pull ref was PR #1, a Hono dependency bump unrelated to the Portal Registry-role/type path. The 59-entry public Known Issues list dated 2026-08-14 was checked again on 2026-09-01 for the Registry roles page, indexer type classification, PermissionedResolver treatment, and role bitmap schemas; no exact or near match was found. Private-report overlap cannot be observed and is not claimed.

Proof of Concept

Security claim established

The self-contained PoC embedded in this report proves the direct victim navigation trigger and its Critical impact. After public ingress has made P discoverable and materialized, the victim enters the first-party /registry/P/roles route directly. The executed Portal component binds both the role table and Add User sheet to P, while the actual ENSJS builder converts the displayed Registrar choice into bit-0 grantRootRoles(1, attacker) calldata.

That exact calldata is joined to real local receipts on one PermissionedResolver proxy. Before the grant, the attacker has no root bit 0 and setAddr(victim.eth) reverts. The grant receipt succeeds, root ROLE_SET_ADDR becomes true, and the attacker-signed setAddr receipt succeeds, changing the resolver output from zero to the attacker. The regenerated independent verifier passes all 20 target, schema, calldata, receipt, signer, role-transition, and terminal-state checks.

Every write is local. The embedded PoC makes no public RPC request and contacts no production service. It deliberately begins after materialization and independently verifies the route decision, generated calldata, successful grant, role transition, attacker write, and final resolver output.

Evidence chain and reproduction layout

The evidence joins four independently inspectable segments:

  1. hash-verified execution of the direct Registry route with missing-row, admin-row, and non-admin controls;
  2. execution of the actual ENSJS bit-0 builder used by Portal;
  3. local EVM execution against a real PermissionedResolver proxy, including pre-grant denial, the raw-calldata grant, attacker setAddr, and both successful receipts; and
  4. an independent 20/20 verifier linking the route target, displayed role, calldata, signer, role transition, and final resolver output.

The final report embeds these 15 files byte-for-byte below: the environment declaration, exact reproduction commands, setup.sh, portable foundry.toml.template, run_portal_harness.sh, the complete 365-line Portal component harness, the executed ENSJS grantRoles.ts builder, the executed Registry role constants, the complete 214-line Solidity test, the complete receipt verifier, the 20-check entrypoint, sanitized builder evidence, local receipt evidence, fresh Forge output, and the regenerated verdict.

Prerequisites and run commands

The bounded proof has no unstated local dependency. It requires Bash, Node 22, realpath, jq, and Foundry (forge, anvil, cast); an official audit-comp-ens checkout at commit 1c9b47f18fcddd2e864dfe385c4171061c9811ae with locked pnpm dependencies; and an ENSv2 contracts-v2 checkout at commit 48b3e2d39513b9dd32ef1850877a29009bc807b9 with submodules initialized. PORTAL_ROOT points to apps/portal; CONTRACTS_ROOT points to contracts-v2/contracts. No archive RPC, Docker image, Python package, browser, public chain, or production endpoint is needed for this bounded route.

Create both fixed source checkouts from the same empty directory before running the proof:

Shell
git clone https://github.com/immunefi-team/audit-comp-ens.git audit-comp-ens
git -C audit-comp-ens checkout --detach 1c9b47f18fcddd2e864dfe385c4171061c9811ae
pnpm --dir audit-comp-ens install --frozen-lockfile

git clone --recurse-submodules https://github.com/ensdomains/contracts-v2.git contracts-v2
git -C contracts-v2 checkout --detach 48b3e2d39513b9dd32ef1850877a29009bc807b9
git -C contracts-v2 submodule update --init --recursive

Setup and all bounded checks run from the directory where the embedded files are saved:

Shell
export PORTAL_ROOT=./audit-comp-ens/apps/portal
export CONTRACTS_ROOT=./contracts-v2/contracts

bash setup.sh
bash run_portal_harness.sh
forge test -vvv | tee evidence/forge_output.txt
bash run_20_checks.sh

setup.sh rejects wrong commits or missing declared files and generates foundry.toml from a portable template. run_portal_harness.sh resolves the installed Vite/esbuild package through realpath; the harness then checks fixed SHA-256 values for the Registry route, permission vocabulary, Registry role constants, and ENSJS builder before executing them. The REPRODUCE.md block below contains every local Anvil deployment, proxy initialization, Portal builder, raw-calldata grant, attacker setAddr, state-read, and verifier command, including the standard public Anvil development keys.

Execution sequence and witnesses

  1. evidence/portal_builder.json records the executed direct route. With no materialized row, the route produces Not Found and no Add User. With a P row and admin state, it binds both table and sheet to P and enables Add User; non-admin state suppresses the action. The hash-verified ENSJS builder records functionName = grantRootRoles, arguments [1, attacker], and calldata `0x072d5d77000000000000000000000000000000000000000000000000000000000000000100000000000000000000000070997970c51812d

The original report as published on Immunefi, by yaohao159123. 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 Portal binds Registry permission semantics to a bare address from indexer discovery without verifying the target's contract kind, so a shared selector and bitmap position are interpreted under the wrong schema.

Impact

The attacker gains root address-writing authority on the victim's resolver and can redirect the victim's name records, though a legitimate root admin could later revoke the role and restore the record.

What the attacker needed

Attacker registers a decoy .eth name; victim owns a Portal-deployed resolver; victim opens a direct /registry URL; victim approves one grant transaction

The fix

The Registry roles route should verify the target's contract kind, for example by reusing the existing implementation-aware PermissionedResolver check, and refuse to prepare a grant when the verified schema differs from the displayed permission vocabulary.

How it was found

  1. Register an ordinary decoy .eth name through the public registrar.
  2. Set the victim as the decoy's owner and the victim's PermissionedResolver as its subregistry.
  3. Let registry discovery and the indexer materialise the resolver address as a registry.
  4. Send the victim the direct /registry/P/roles URL and ask them to add the attacker as an operator.
  5. The victim selects only the Registrar permission and confirms once, sending grantRootRoles(1, attacker) to the resolver.
  6. The attacker calls setAddr on the victim's real name and redirects it to an attacker-controlled 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 resolver is the contract that decides what address a name points to. The Portal showed the user a permission called 'Registrar' but sent the same number to a resolver contract, where that number means 'can change any address record'. Because the Portal never checked what kind of contract it was talking to, one normal-looking approval gave the attacker the power to point the victim's name at an address they control.

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 yaohao159123

View all

4 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.