Skip to content
Info disclosure Audit finding Advanced

Missing registry scoping in the role history query lets anyone write permanent forged role change entries into any ens name s audit trail

The Explorer's role History panel queries the indexer for all EACRolesChanged events by type only, then narrows them client-side by a resource identifier derived from the label alone, which is identical across every registry. Because anyone can deploy a registry through the Explorer's own factory and register the same label, an attacker can emit role-change events carrying a victim name's resource and have forged, permanent entries appear in that name's history.

kwaro Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

92825 w a medium missing registry scoping in the role history query lets anyone write permanent forged role change entries into any ens name s audit trail

Submitted on Sep 12th 2026 at 16:10:30 UTC by @kwaro for Audit Competition | ENS

Description

Brief/Intro

The Explorer shows a History panel for each name's roles: who was granted what, and when. It builds that panel by asking the indexer for every EACRolesChanged event in existence and keeping the ones whose resource identifier matches the name being viewed. That identifier is derived from the label alone and is identical across every registry, and the query never asks which contract emitted the event. Deploying a registry is a supported Explorer feature, so in production anyone can emit role changes carrying another name's resource identifier and have them appear in that name's history, permanently, choosing both the account shown and the roles attributed to it. The panel is the record an operator consults to decide who currently holds authority over a name, and it can be written to by anyone for the price of one contract deployment. The write is executed below against the real deployed Sepolia contracts, targeting a name that is really registered in the live ETHRegistry.

Vulnerability Details

The query asks for events by type, and nothing else

apps/portal/src/features/roles/hooks/useRoleHistory.ts, lines 46 to 72:

TS
    const { events } = yield* fromPromise(
      graphqlIndexerClient.request<{
        events: IndexerEACEvent[]
      }>(
        gql`
          query getRoleHistory($blockNumberLt: Int!, $first: Int!) {
            events(
              where: {
                type: "EACRolesChanged"
                blockNumber_lt: $blockNumberLt
              }
              first: $first
              orderBy: blockNumber
              orderDirection: desc
            ) {
              type
              data
              transactionHash
              timestamp
              blockNumber
            }
          }
        `,
        { blockNumberLt, first: PAGE_SIZE },
      ),
      (e) => new GetRoleHistoryError({ cause: e as ClientError }),
    )

There is no registry in the where clause, and contractAddress is not in the selection set either. The results are then narrowed client-side, on lines 84 and 86:

TS
  const resource = label ? toResourceHex(labelToCanonicalId(label)) : undefined

  return ok(filterEventsByResource(allEvents, resource))

The resource comes from the label and nothing else. labelToCanonicalId takes a single argument, so there is nowhere to pass a registry even if a caller wanted to, and the proof of concept measures that rather than asserting it.

The client cannot distinguish registries even in principle, because the event type it works with has no field for the emitting contract. apps/portal/src/lib/roles/filterEventsByResource.ts, lines 5 to 11:

TS
export type IndexerEACEvent = {
  readonly type: string
  readonly data: string
  readonly transactionHash: Hex
  readonly timestamp: number
  readonly blockNumber: number
}

The codebase already reached the opposite conclusion

apps/portal/src/features/roles/hooks/useNameRoleAccounts.ts reads the same events for the same feature. Its own documentation, lines 52 to 61:

TS
/**
 * Read current `(account → roles[])` state for `resource` on `registryAddress`
 * from the indexer by replaying `EACRolesChanged` events.
 *
 * We can't use the indexer's top-level `roles(resource:)` field because it
 * isn't scoped by registry — `ROOT_RESOURCE` (`0x0`) is shared across every
 * sub-registry, so a resource-only filter would conflate role grants across
 * unrelated registries. The `events(contractAddress:)` filter is registry-
 * scoped, so we use that and reconstruct state client-side.
 */

That hook passes contractAddress on line 77, and useRegistryRoleHistoryForAccount does the same. Only the History hook omits it.

The History hook does carry a defending note, and it is worth quoting because it does not cover this. Lines 32 to 36:

TS
  // NOTE: We intentionally do not filter by `domain` in the GraphQL query.
  // The indexer does not currently populate the `domain` relation on
  // `EACRolesChanged` events for many names (e.g. 2LDs like `fresh.eth`),
  // so filtering server-side by `domain` would drop valid events. Instead we
  // fetch by event type and filter client-side by the resource hex.

That explains why the query avoids domain. contractAddress is a different field, it is registry-scoped, and the sibling hook demonstrates that it works.

The filter that is available and unused

The indexer's generated schema is shipped in this repository at packages/indexer/graphql.gen.ts, and it is the contract the deployed indexer serves. Two lines from it settle the shape of the data.

Line 249, on the Event type:

TS
  contractAddress: Scalars['String']['output'];

That field is non-nullable. Every indexed event carries the contract that emitted it, which a schema serving a single-contract index would not require.

Line 282, on EventFilter:

TS
  contractAddress?: InputMaybe<Scalars['String']['input']>;

The registry scoping this hook needs is already available in the API it is calling. It simply does not pass it.

Who can emit matching events, run against the deployed contracts

Deploying a registry is a supported Explorer feature, not an exotic precondition: apps/portal/src/features/registry/helpers/deploySubregistry.ts line 14 imports ensjs's deploySubregistryWriteParameters, and the flow deploys a user registry through the VerifiableFactory.

Rather than argue from that, the chain arm of the proof of concept executes it. verification/pocs/H-C7-19/fork/run.sh runs against a Sepolia fork pinned to block 11689000, so every ENS contract in the path is the real deployed bytecode, checked non-empty before anything else happens:

contract address codesize on the fork
VerifiableFactory 0x10dC6333CDFe1FCEf624c6e0a8221b91804Cd7ef 1411
registry implementation the Explorer deploys 0x624a25d67B59D587752EbEc8DdeD8827dAe52050 17159
ETHRegistry 0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2 14730

Those are not addresses this proof chose. They are the ones the Explorer's own deploy form resolves. apps/portal/src/features/registry/components/v2/ConfigureRegistryForm.tsx, lines 33 to 41:

TS
const factoryAddress = getChainContractAddress({
  chain: sepoliaWithEns,
  contract: 'ensVerifiableFactory',
})

const implAddress = getChainContractAddress({
  chain: sepoliaWithEns,
  contract: 'ensUserRegistryImpl',
})

Both are passed straight into deploySubregistry, and in the pinned @ensdomains/ensjs the Sepolia entries for those two names are 0x10dC6333CDFe1FCEf624c6e0a8221b91804Cd7ef and 0x624a25d67B59D587752EbEc8DdeD8827dAe52050. The repository pins the same deployment independently: packages/smart-account/src/providers/rhinestone/manifest.test.ts asserts verifiableFactory on line 52, verifiableFactoryProxyLogic 0xA136BeE4E37B44586242e516a39893EfD54315e9 on line 53, and ethRegistry on line 57. That middle address is the delegatecall frame in the trace below, so the proxy the attacker deploys runs through the Explorer's own proxy logic into the Explorer's own registry implementation.

The rig also reads the deployed address the same way the Explorer does, off the first log of the receipt, as deploySubregistry.ts lines 26 to 33 do.

The victim is heliamphora, a name really registered in that live ETHRegistry, owned by 0x1995c710324D68F4e58C507f92122F94D6cc27A4. Its resource is read from the chain rather than computed by the test, and it equals the value the History hook filters on:

victim_is_registered_in_real_ethregistry: 2
real_ethregistry_resource: 105698915282361830913465873118721338883054990857144678076409293866607304507392
real_resource_equals_labelToCanonicalId: 1

The attacker is a fresh externally owned account, 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F, with no code and no authority over that name. Both are measured, and the second is measured twice, once as a state read and once as a failed call:

attacker_has_no_code: 0
attacker_has_any_role_on_victim_in_real_registry: false
grant_on_REAL_ethregistry_reverted: 1
  revert: EACCannotGrantRoles(105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], 5708990770823839524233143877797980545530986496 [5.708e45], 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F)

That account then deploys a registry through the Explorer's own factory, registers the victim's label in the registry it now owns, and reads back the resource that registry assigns to it. It is the same number:

attacker_registry_deploy_status: 1
attacker_registry_address: 0xa6e2a145fc351b5c62e275fdfe140f22dd95240f
attacker_register_status: 1
attacker_registry_resource_for_victim_label: 105698915282361830913465873118721338883054990857144678076409293866607304507392
attacker_resource_equals_victim_resource: 1

Nothing about registering the label in the attacker's own registry touches the victim's name in the ETHRegistry. It mints a token in a contract the attacker controls whose EAC resource happens to be the same integer, because the resource is the label's canonical id and a label hashes the same everywhere.

One grantRoles call then produces the event. The trace names the sender and the emitter:

Traces:
  [107313] 0xA6E2a145Fc351B5c62E275FdfE140F22DD95240f::grantRoles(105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], 17891328 [1.789e7], 0x2222222222222222222222222222222222222222)
    ├─ [104629] 0xA136BeE4E37B44586242e516a39893EfD54315e9::grantRoles(105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], 17891328 [1.789e7], 0x2222222222222222222222222222222222222222) [delegatecall]
    │   ├─ [99537] 0x624a25d67B59D587752EbEc8DdeD8827dAe52050::grantRoles(105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], 17891328 [1.789e7], 0x2222222222222222222222222222222222222222) [delegatecall]
    │   │   ├─ emit EACRolesChanged(resource: 105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], account: 0x2222222222222222222222222222222222222222, oldRoleBitmap: 0, newRoleBitmap: 17891328 [1.789e7])
    │   │   ├─ emit TransferSingle(operator: 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F, from: 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F, to: 0x0000000000000000000000000000000000000000, id: 105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], value: 1)
    │   │   ├─ emit TokenRegenerated(oldTokenId: 105698915282361830913465873118721338883054990857144678076409293866607304507392 [1.056e77], newTokenId: 105698915282361830913465873118721338883054990857144678076409293866607304507393 [1.056e77])
    │   │   ├─ emit TransferSingle(operator: 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F, from: 0x0000000000000000000000000000000000000000, to: 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F, id: 105698915282361830913465873118721338883054990857144678076409293866607304507393 [1.056e77], value: 1)
    │   │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000001
    │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000001
    └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000001


Transaction successfully executed.
Gas used: 124549

The innermost frame is the Explorer's own registry implementation, reached by delegatecall through the proxy the factory deployed. The resource is the victim's. The account and the role bitmap are both arguments the attacker chose. That single transaction costs 124549 gas.

Finally, the filter value is not a theoretical one. The chain arm sweeps a 12,000-block window of the live ETHRegistry's own logs and checks every EACRolesChanged it finds. Every one of them carries a resource whose low 32 bits are zero, which is exactly the form labelToCanonicalId produces, so the value the History hook filters on is the value production actually emits:

production_low32_zero_fraction_is_all: 1

The arm also prints the three counts behind that ratio, and they are deliberately not quoted as evidence. The block range is fixed, yet the count fell from 415 to 407 across five runs while this report was written, which means the public endpoint serving the historical log query returns a partial result set rather than a complete one. So this is a sample of production events, not an exhaustive sweep, and the honest claim is the one made above: every event the sweep returned carried a low-32-bits-zero resource, on every run. Nothing else in this report depends on it. Every other figure is read from the pinned fork and reproduces exactly.

Impact Details

The impact selected is the persistent static-content injection row, at High severity. Quoted exactly as the programme lists it:

Injecting/modifying the static content on the target application without JavaScript (persistent), such as:

  • HTML injection without JavaScript
  • Replacing existing text with arbitrary text
  • Arbitrary file uploads, etc.

The injection is persistent, requires no JavaScript, and appears on a page other users view. An attacker chooses both the account address shown in the row and the roles attributed to it, and the entries carry a real transaction hash and a real timestamp, so nothing distinguishes them from genuine ones.

The victim has no move. The events are on-chain and cannot be deleted. The panel has no notion of which registry an entry came from, because IndexerEACEvent has no field for it. There is no denylist, no hiding and no per-entry dismissal anywhere in the roles or history features. And the only call site, RoleHistoryTable.tsx line 155, passes { label } and nothing else, so there is no place for the victim's own registry address to enter the query even if the UI offered the choice. Revoking every role on the name changes nothing: the forged rows were never grants against the victim's registry in the first place.

What makes the forged rows credible rather than obviously wrong is that the two panels disagree, and only one of them is wrong. The current-roles view is registry-scoped: useNameRoleAccounts passes contractAddress on line 77, so a foreign registry's event never reaches it. The History view is not. An operator therefore sees a current-roles list that does not include 0x2222222222222222222222222222222222222222, and a history that says 0x2222222222222222222222222222222222222222 was granted three roles and never had them revoked. The natural reading of that pair is not "the history is forged" but "someone granted roles and the state view is stale", which is precisely the wrong conclusion.

The consequence is that the History panel stops being an audit trail. It is the record an operator consults to decide who currently holds authority over a name and whether a past grant was revoked. Fabricated rows can suggest that an unfamiliar address was granted an admin role, or that a real grant has already been revoked and so needs no action. The plausible harm is an induced administrative decision: revoking the wrong account, or declining to revoke a real one. The cost to the attacker is one contract deployment, and the entries are permanent.

The honest objection, stated so a reviewer does not have to find it. The injected content is structured rather than free text: an address, role names, a transaction hash and a timestamp, not arbitrary markup. A reviewer may read "replacing existing text with arbitrary text" more narrowly than that. If the impact is judged not to fit, the substance is unchanged: this is an authorization audit trail that anyone can forge, and it should be filed under whichever impact the programme considers correct for that.

References

  • apps/portal/src/features/roles/hooks/useRoleHistory.ts lines 32 to 36 (the note that justifies dropping domain, not contractAddress), 46 to 72 (the unscoped query), 84 and 86 (resource-only narrowing)
  • apps/portal/src/features/roles/hooks/useNameRoleAccounts.ts lines 52 to 61 (the comment reaching the opposite conclusion) and line 77 (the contractAddress filter in use)
  • apps/portal/src/lib/roles/filterEventsByResource.ts lines 5 to 11 (the event type carries no contract) and the resource-only filter below it
  • apps/portal/src/features/registry/helpers/deploySubregistry.ts line 14, the Explorer's own registry deployment flow, and lines 26 to 33, which read the deployed address off the receipt's first log
  • apps/portal/src/features/registry/components/v2/ConfigureRegistryForm.tsx lines 33 to 41, where the Explorer resolves the factory and the registry implementation this proof uses
  • packages/smart-account/src/providers/rhinestone/manifest.test.ts lines 52, 53 and 57, the repository's own pinned Sepolia deployment for the factory, its proxy logic and the ETHRegistry
  • apps/portal/src/features/registry/hooks/useRegistryRoleHistoryForAccount.ts lines 6 to 8 (the codebase calling useRoleHistory the global one) and lines 47 to 77 (the same indexer queried with an arbitrary contractAddress)
  • apps/portal/src/routes/registry/$address/index.tsx, the route keyed on any registry address
  • apps/portal/src/features/roles/components/RoleHistoryTable.tsx line 155, the only call site, which passes a label and nothing else
  • packages/indexer/graphql.gen.ts line 249 (Event.contractAddress, non-nullable) and line 282 (EventFilter.contractAddress, available and unused)

Proof of Concept

Step-by-step reproduction

The scenario is automated by the two scripts in the Full source section below, and was executed against commit 1c9b47f18fcddd2e864dfe385c4171061c9811ae. It has two arms. The first produces the attacker's event on the real contracts; the second feeds that event, and a genuine one, to the real hook.

Produce the event, on a Sepolia fork of the deployed contracts

  1. Fork Sepolia at block 11689000 and confirm the VerifiableFactory, the registry implementation the Explorer deploys, and the ETHRegistry all have code.
  2. Pick a victim that is really registered in the live ETHRegistry. Read its status and its resource from the chain, and confirm the resource equals labelToCanonicalId(label) computed independently.
  3. Confirm the attacker's account has no code, holds no role over that name, and that grantRoles against the real ETHRegistry reverts for it.
  4. Deploy a registry through the Explorer's own VerifiableFactory, with the Explorer's own implementation and its initialize(admin, roleBitmap) calldata.
  5. Register the victim's label in that registry. Read back the resource it assigns and confirm it is the same integer as the live one.
  6. Call grantRoles with that resource, an account of the attacker's choosing and a role bitmap of the attacker's choosing. Read the emitted log off the chain and confirm the emitter is the attacker's registry, the resource is the victim's, and the account is the one chosen.
  7. Pull the genuine EACRolesChanged event for the same name out of the live ETHRegistry's own logs, so the next arm can be handed one real event from each contract.

Establish the shape of the data

  1. Read packages/indexer/graphql.gen.ts, the generated schema the deployed indexer serves. Confirm Event.contractAddress is a non-nullable output field, so every indexed event carries its emitting contract. Confirm EventFilter.contractAddress exists, so registry scoping is available to any caller.

Drive the real hook

  1. Take the real exported getRoleHistoryQueryOptions from useRoleHistory.ts and invoke its own queryFn, passing the options object's own queryKey, which is exactly what tanstack-query supplies at runtime. This executes the real GraphQL document, the real pagination loop, the real resource derivation and the real filterEventsByResource.
  2. Answer the indexer request with the two real logs from the first arm: one emitted by the live ETHRegistry, one emitted by the attacker's registry. They carry byte-identical resources.
  3. Capture the GraphQL document the hook emits and inspect its text. Confirm it filters on event type, and that contractAddress appears nowhere in it, neither as a filter nor in the selection set.
  4. Read the entries the hook returns. Both rows are present, and nothing in the returned data distinguishes the foreign one from the legitimate one.

Control

  1. Repeat with one input changed: a different name is being viewed. Both rows are correctly excluded. This shows the resource filter itself works, which isolates the defect to the missing registry scoping.

Check the premise rather than assume it

  1. Confirm labelToCanonicalId accepts exactly one argument, so there is nowhere to pass a registry.
  2. Confirm the two contracts' events carry byte-identical resource strings, so the collision is real rather than an artefact of how the test builds them.

What executes for real, and what is substituted

The scenario runs under the Explorer's own vitest configuration. Executing for real: the exported hook, the GraphQL document it builds, its pagination loop, the resource derivation through toResourceHex(labelToCanonicalId(label)), and filterEventsByResource. The query text is captured and inspected rather than read off the source, so the absence of the filter is measured.

Substituted, with the reason it cannot be the real thing:

  • The indexer's network transport. graphqlIndexerClient.request is replaced by a recorder, restored in a finally block. It cannot be the real indexer: packages/indexer in this repository is only the GraphQL client, codegen, urql and generated types, not the indexing service, so there is no local instance; and no request may be sent to a deployed one. The substitution is also what supplies the condition under test, namely events from two different contracts. Nothing inside the hook is mocked, and in the second test the events it hands back are not constructed at all: they are the two real logs the first arm captured.

Not substituted, though it may look like it: the chain. The first arm runs anvil, but anvil is forking Sepolia, so the factory, the registry implementation and the ETHRegistry are the deployed bytecode, read live and asserted non-empty by codesize before the run proceeds. What is local is block production, which is what keeps the attacker's transactions off the live network.

What this proof does not cover

One thing, stated plainly. Everything from the attacker's transaction to the rendered row is executed. What is not executed is the ingestion step in between: whether the deployed indexer picks up one specific attacker-deployed registry. That is a property of its runtime configuration, packages/indexer in this repository is only the GraphQL client, so there is no indexing service here to run, and no request may be sent to a deployed one.

Three things bound that gap from the repository itself.

The schema is multi-contract by construction. Event.contractAddress is non-nullable, which a single-contract index would not require, and EventFilter.contractAddress exists as a filter callers may pass.

The Explorer already reads arbitrary registries out of this index. apps/portal/src/routes/registry/$address/index.tsx is a route keyed on any registry address, and the hook behind it, apps/portal/src/features/registry/hooks/useRegistryRoleHistoryForAccount.ts lines 47 to 77, asks this same indexer for that registry's EACRolesChanged events with contractAddress set to whatever address the URL carried. If the index did not span user-deployed registries, that route would be permanently empty.

And the codebase names the defect itself. The doc comment on that same file, lines 6 to 8:

TS
 * for the supplied account. Mirrors the query strategy used by
 * `useNameRoleAccounts` (which is per-name) and `useRoleHistory` (which is
 * global) but scoped to the registry overview's add/edit-user UI.

useRoleHistory is the History hook. Its own siblings describe it as the global one.

Measured output, chain arm

bash verification/pocs/H-C7-19/fork/run.sh. Two things are elided: the call trace, which is quoted in full above, and the three production_* counts, which do not reproduce for the reason given above. Everything shown reproduces exactly.

fork_chain_id: 11155111
fork_block: 11689000
attacker_address: 0x56262F1779298D9c7C22f5273ee254C3d8e4fA4F
attacker_has_no_code: 0
codesize_factory: 1411
codesize_impl: 17159
codesize_ethregistry: 14730
victim_label: heliamphora
victim_labelhash: 0xe9af774adcfe12ad33ceff00de5811fde316c4838ca2bee5e72f783b7562a54a
labelToCanonicalId_decimal: 105698915282361830913465873118721338883054990857144678076409293866607304507392
victim_is_registered_in_real_ethregistry: 2
real_ethregistry_resource: 105698915282361830913465873118721338883054990857144678076409293866607304507392
real_resource_equals_labelToCanonicalId: 1
victim_owner_in_real_registry: 0x1995c710324D68F4e58C507f92122F94D6cc27A4
attacker_has_any_role_on_victim_in_real_registry: false
grant_on_REAL_ethregistry_reverted: 1
attacker_registry_deploy_status: 1
attacker_registry_address: 0xa6e2a145fc351b5c62e275fdfe140f22dd95240f
attacker_registry_resource_for_victim_label: 105698915282361830913465873118721338883054990857144678076409293866607304507392
attacker_resource_equals_victim_resource: 1
attacker_register_status: 1
grant_on_attacker_registry_status: 1
eac_event_topic0: 0x0d35bf721a39b614de00ca5038e1deb0cb0c69a278645e83405a7226cf80ba3c
eac_rolechanged_logs_emitted: 1
log_emitting_contract: 0xa6e2a145fc351b5c62e275fdfe140f22dd95240f
log_emitter_is_attacker_registry: 1
log_resource_decimal: 105698915282361830913465873118721338883054990857144678076409293866607304507392
log_resource_equals_labelToCanonicalId: 1
log_account: 0x2222222222222222222222222222222222222222
log_account_is_attacker_chosen: 1
log_oldRoleBitmap: 0
log_newRoleBitmap: 17891328
log_tx_hash: 0xcde44aada5794362eaa6d927d9e4b466dd1ebc4ece096d44d46772d35a7d28f6
log_block_number: 11689003
STEP4_OK: 1
forging_tx_sender_is_the_attacker_eoa: 0x56262f1779298d9c7c22f5273ee254c3d8e4fa4f
production_low32_zero_fraction_is_all: 1
genuine_production_events_for_victim_resource: 1
genuine_event_emitter: 0xbdc85dd5b15d7ecb354cd7cb6f2c50b4f2c4f0e2
genuine_event_account: 0x1995c710324d68f4e58c507f92122f94d6cc27a4
genuine_event_block: 11680097
STEP6_OK: 1

FORK ARM: ALL CHECKS PASSED

The two events it writes out, byte for byte as the arm captured them. The genuine one, from the live ETHRegistry:

JSON
{
  "type": "EACRolesChanged",
  "data": "{\"resource\": \"0xe9af774adcfe12ad33ceff00de5811fde316c4838ca2bee5e72f783b00000000\", \"account\": \"0x1995c710324d68f4e58c507f92122f94d6cc27a4\", \"oldRoleBitmap\": \"0x0\", \"newRoleBitmap\": \"0x1110000000000000000000000000000001100000\"}",
  "transactionHash": "0x73864ba3a7ac3984cb5c63c2c418ccf233ba04194474ccc9cafe226b502f9097",
  "timestamp": 0,
  "blockNumber": 11680097,
  "_emittingContract": "0xbdc85dd5b15d7ecb354cd7cb6f2c50b4f2c4f0e2"
}

And the attacker's:

JSON
{
  "type": "EACRolesChanged",
  "data": "{\"resource\": \"0xe9af774adcfe12ad33ceff00de5811fde316c4838ca2bee5e72f783b00000000\", \"account\": \"0x2222222222222222222222222222222222222222\", \"oldRoleBitmap\": \"0x0\", \"newRoleBitmap\": \"0x1110000\"}",
  "transactionHash": "0xcde44aada5794362eaa6d927d9e4b466dd1ebc4ece096d44d46772d35a7d28f6",
  "timestamp": 0,
  "blockNumber": 11689003,
  "_emittingContract": "0xa6e2a145fc351b5c62e275fdfe140f22dd95240f"
}

Different _emittingContract, identical resource. That field is carried here only so this report can show which contract each event came from. It is not part of IndexerEACEvent, and the rig strips it before handing either event to the hook, because the hook's own type has no such field to strip in production.

Measured output, application arm, exploit

schema_event_requires_contractAddress: 1
schema_filter_offers_contractAddress: 1
chain_victim_label: heliamphora
arm: exploit
graphql_queries_issued: 1
query_filters_by_event_type: 1
query_mentions_contractAddress_anywhere: 0
query_selects_contractAddress_field: 0
history_entries_returned: 2
legit_registry_row_rendered: 1
FOREIGN_REGISTRY_ROW_RENDERED_IN_VICTIM_HISTORY: 1
resource_derivation_arity: 1
resource_identical_across_registries: 1
impact_row_primary: 46

and, from the second test, driven with the two real logs:

arm: exploit
viewed_label: heliamphora
genuine_event_emitter: 0xbdc85dd5b15d7ecb354cd7cb6f2c50b4f2c4f0e2
genuine_event_tx: 0x73864ba3a7ac3984cb5c63c2c418ccf233ba04194474ccc9cafe226b502f9097
forged_event_emitter: 0xa6e2a145fc351b5c62e275fdfe140f22dd95240f
forged_event_tx: 0xcde44aada5794362eaa6d927d9e4b466dd1ebc4ece096d44d46772d35a7d28f6
emitters_differ: 1
resources_byte_identical: 1
reso

The original report as published on Immunefi, by kwaro. 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

The History query filters only on event type and narrows results client-side by a label-derived resource, omitting the registry-scoped contractAddress filter that sibling hooks use.

Impact

Forged role-change entries appear permanently in any name's history panel, with real transaction hashes and timestamps, which could mislead an operator into revoking the wrong account or declining to revoke a real one; the current-roles view is unaffected because it is registry-scoped.

What the attacker needed

Ability to deploy a registry via the Explorer; victim name registered in a live registry; no special privileges needed

The fix

The History query should pass the registry's contractAddress as a filter, as the sibling role hooks already do.

How it was found

  1. Fork Sepolia and confirm the factory, registry implementation and ETHRegistry have code
  2. Read the victim name's resource from the live ETHRegistry and confirm it matches the label-derived id
  3. Confirm the attacker holds no role and that granting on the real registry reverts
  4. Deploy a registry through the Explorer's factory and register the victim's label
  5. Call grantRoles with the victim's resource, a chosen account and role bitmap
  6. Feed the resulting event and a genuine one to the real hook and observe both rows returned

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.

ENS names live in registries, and each name has an identifier computed from its label. The Explorer's history view asks the indexer for every role-change event and keeps those whose identifier matches the name you are viewing, without checking which contract emitted them. Since anyone can deploy their own registry and register the same label, they can create events with the same identifier and have them shown as if they happened to the real name.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by kwaro

View all

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

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.