Explorer resolves a recipient ENS name that has no addr(60) record to the owner of its ENS v2 registry entry, so one ordinary paid v2 registration by a stranger redirects a nam
The Explorer's name-to-address helper returns the owner of a name's registry entry as the name's address when the name publishes no address record, and it consults the v2 registry before v1. A stranger can therefore register a free v2 label matching a live v1 name that has no address record, and any user who types that name as a transfer recipient sends their name token to the stranger.
Originally disclosed on Immunefi
- Disclosed after under an hour
91900 w a critical explorer resolves a recipient ens name that has no addr 60 record to the owner of its ens v2 registry entry so one ordinary paid v2 registration by a stranger redirects a nam
Submitted on Sep 5th 2026 at 11:34:54 UTC by @br0nz3p1ck4x3 for Audit Competition | ENS
- Report ID: #91900
- Report Type: Websites & Apps
- Report severity: Critical
- Target: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/portal
- Impacts:
- Direct theft of user NFTs
Description
Summary
apps/portal/src/utils/ens/resolveEnsOwner.ts:72-105 resolves a .eth name by trying ENS v2 FIRST and only falling through to ENS v1 when the v2 lookup is empty (:83-92):
if (tld === 'eth' && labels.length >= 2) {
const v2 = await resolveV2EthOwner(client, name)
if (v2) {
return {
owner: v2.owner,
registryAddress: v2.registryAddress,
protocolVersion: 'ENSv2',
}
}
}
apps/portal/src/features/roles/helpers/addUser.handlers.ts:11-40 is resolveAddressOrName, the function behind every "name or address" field in the Explorer. It asks the UniversalResolver for addr(60), and when there is no addr(60) record it falls back to that owner lookup and returns the OWNER of the name's registry entry as if it were the name's address. Verbatim, addUser.handlers.ts:25-34:
let resolvedAddress = resolved
// Fallback for names that do not set an address record:
// use current ENS owner address so the role can still be granted.
if (!resolvedAddress) {
const ownerResult = await getEnsOwner({ name: nameOrAddress })
if (ownerResult.isOk()) {
resolvedAddress = ownerResult.value?.owner ?? null
}
}
Combine the two and you get: for a live ENS v1 .eth name that publishes no addr(60) record and whose label is still FREE in the v2 .eth registry, whichever address holds the v2 entry is the address the Explorer derives from that name. Since the label is free, a stranger can take that position with one ordinary, fully paid v2 registration.
The comment says "so the role can still be granted", which is the add-user use case. But the value does not stay in the roles feature. The exact chain, grepped end to end:
| File:line | Code |
|---|---|
apps/portal/src/features/transfer/components/SendNameForm.tsx:81-82 |
const resolution = useAddressResolution(recipientInput) then const { address: recipient, isResolving } = resolution |
apps/portal/src/features/address/hooks/useAddressResolution.ts:47, 60-61 |
defines the hook; runs getResolvedAddressQueryOptions({ nameOrAddress: debounced }) |
apps/portal/src/features/address/queries/getResolvedAddress.ts:26-29 |
const address = await resolveAddressOrName({ client, nameOrAddress: params.nameOrAddress }) |
apps/portal/src/features/transfer/components/SendNameForm.tsx:107-108 |
if (!recipient || !canStart) return then startTransfer({ recipient, options: effectiveOptions }) |
apps/portal/src/features/transfer/hooks/useTransferName.ts:143 |
transferToken({ ...common, registryAddress, tokenId, recipient, id }) |
apps/portal/src/features/transfer/helpers/transferToken.ts:67-71 |
encodeFunctionData({ abi: erc1155Abi, functionName: 'safeTransferFrom', args: [walletWithAccount.account.address, recipient, tokenId, 1n, '0x'] }) |
apps/portal/src/features/transfer/helpers/transferToken.ts:79 |
to: registryAddress |
Reach, counted rather than asserted: resolveAddressOrName has exactly ONE caller repo-wide, getResolvedAddress.ts:26 (rg over apps/portal/src returns that call site plus the definition, the import, and one comment reference). getResolvedAddress feeds useAddressResolution, which has FIVE call sites: the transfer recipient (SendNameForm.tsx:81), the create-subname owner (routes/$name/create-subname.tsx:109), and the three add-user sheets (RolesAddUserSheet.tsx:73, RegistryAddUserSheet.tsx:66, ResolverAddUserSheet.tsx:141). The transfer recipient is the one this report exploits, because that is the one where an ERC-1155 moves.
The victim's name and the recipient name are unrelated. The attacker does not need to control, touch, or even look at the victim's name. They need only to be the party a recipient name resolves to.
The printed on-chain result, from the PoC transcript reproduced in full below (poc/transcript-04-partB.txt):
balanceOf(victim 0x345929dc2E57817C16AEDc65f5e0cF2817299406, tokenId) = 1
balanceOf(attacker 0x0b8ab205Cc4e88352bdc6FC49290e4c31cDA40C7, tokenId) = 0
... victim signs the transaction apps/portal/src/features/transfer/helpers/transferToken.ts:67-71 builds ...
balanceOf(victim 0x345929dc2E57817C16AEDc65f5e0cF2817299406, tokenId) = 0
balanceOf(attacker 0x0b8ab205Cc4e88352bdc6FC49290e4c31cDA40C7, tokenId) = 1
NFT STOLEN: true
The token is the ERC-1155 for the victim's real ENS v2 name stronghold.eth in the ETHRegistry at 0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2, token id 38424076124039839195221280089598108906984212041120748309434213820982934634496. It moves to an attacker who owns nothing of the victim's, holds no role over the victim's name, and never touched the v1 registry.
Why this row and not the display row, stated first because it is the honest weakness
The transfer form DOES render the resolved recipient address, in full and untruncated.
apps/portal/src/features/transfer/components/SendNameForm.tsx:248-249:
.with({ recipient: P.nonNullable }, ({ recipient }) => (
<RecipientPreview address={recipient} />
SendNameForm.tsx:253 declares RecipientPreview, and at :276-281 it renders:
<CopyableRecord
value={address}
displayValue={address}
textClassName="text-muted-foreground sm:text-xs"
truncate={false}
/>
A victim who has the intended recipient's hex address in front of them, out of band, and compares it character by character will catch this.
That is precisely why this report does not claim the row "Causing the application to display or pre-fill an incorrect address, name, or transaction detail...". Nothing on screen contradicts what the app does: the app derives address X from the typed name and shows address X. The defect is in the derivation, not the display, and the harm the derivation produces is that the victim's name token ends up in a stranger's wallet. Direct theft of user NFTs needs nothing from the display surface at all, so the concession above costs the claim nothing. It is led with rather than defended later.
Rows explicitly NOT claimed, so a reviewer does not answer a clause never made:
| Row | Why it is not claimed |
|---|---|
| "Causing the application to display or pre-fill an incorrect address, name, or transaction detail... resolving or rendering an ENS name to an attacker-controlled address" (Critical) | Its first sub-bullet is literally satisfied, and the PoC prints the resolution flipping to the attacker. Not claimed anyway: on this program a report that needs the confirmation surface to be wrong is closed when the surface is right, and here it is right. |
| "Hijacking or bricking an ENS name during a Manager flow (registration, v1 to v2 migration, or transfer)... redirecting the recipient of a name transfer" (Critical) | The second sub-bullet is this finding word for word, but the row's own qualifier is "during a Manager flow" and this is the Explorer (apps/portal). Named here so the choice is visible; if triage prefers to move the finding to this row, nothing in the report changes. |
| "Malicious interactions with an already-connected wallet... Modifying transaction arguments or parameters" (Critical) | It fits, since the recipient argument is not the party the victim named, but it describes the mechanism where the NFT row describes the realized loss, and the PoC reaches the loss. Its sibling sub-bullet "Inducing a blanket token approval... to an attacker-controlled address" is not claimed: no approval is involved. |
| "Direct theft of user funds" (Critical) | Not claimed: no funds move, the asset is the name token. |
| "Taking state-modifying authenticated actions... on behalf of other users without any interaction by that user" (Critical) | Not claimed: the victim signs. |
| Every availability row, and "Taking down the application/website" | Not claimed: nothing here is availability, and DoS is excluded. |
Impact
An attacker with no relationship to the victim, no role on the victim's name, and no ability to make the victim do anything unusual:
- picks a live v1
.ethname that publishes noaddr(60)record and whose label is still free in the v2.ethregistry. On the pinned Sepolia fork the PoC usedpieslicer.eth. See the population section for how many such names exist and for the limits of that measurement. - makes one ordinary, fully paid v2 registration of that label: commit, wait
MIN_COMMITMENT_AGE, register. Cost on the fork: 8.000021 test USDC. The attacker sets subregistry0x0and resolver0x0, so they publish no records at all. - waits. There is no further attacker action.
Any Explorer user who then types that name into the transfer recipient field gets the attacker's address, and their name token goes to the attacker.
What the attacker never does: touch the v1 registry, touch the victim, touch the victim's name, obtain a role, or send the victim anything. The v1 owner of the recipient name is collaterally affected in that their name now points at a stranger, but they lose nothing directly; the loss lands on whoever transfers a name to them.
And the defect does not even need him. On live Sepolia at head today, with no attacker, no fork and no bait, 14 of 317 sampled live v1 2LD labels are already registered in the v2 registry to an address different from their v1 owner, and three of those (hello.eth, arthy.eth, reposado.eth) publish no addr(60), so the shipped resolveAddressOrName already returns the v2 holder instead of the v1 registrant for them. That measurement, its addresses and its repro commands are in the section "The same defect already misfires on live Sepolia today, with no attacker at all" below. The attacker's registration in this PoC does not create the defect; it selects who benefits from one that is already misfiring.
Root cause
| File:line | Code / behaviour |
|---|---|
apps/portal/src/features/roles/helpers/addUser.handlers.ts:11-40 |
resolveAddressOrName: address passes through; a name goes to getEnsAddress with universalResolverAddress |
apps/portal/src/features/roles/helpers/addUser.handlers.ts:29-34 |
THE DEFECT. No addr(60) leads to getEnsOwner and the registry owner is returned as the address |
apps/portal/src/utils/ens/resolveEnsOwner.ts:72-105 |
resolveEnsOwner: v2 first for .eth, v1 only as fallback, null if neither |
apps/portal/src/utils/ens/resolveEnsOwner.ts:83-92 |
the v2-before-v1 branch, which makes the substituted owner the v2 registrant rather than the name's real v1 owner |
apps/portal/src/features/address/queries/getResolvedAddress.ts:26-29 |
the one caller of resolveAddressOrName; its own doc comment at :14-17 states the fallback as intended behaviour |
apps/portal/src/features/address/hooks/useAddressResolution.ts:47, 60-61 |
the shared hook behind all five "name or address" fields |
apps/portal/src/features/transfer/components/SendNameForm.tsx:81-82, 107-108 |
transfer recipient comes from that hook and is handed to startTransfer |
apps/portal/src/features/transfer/hooks/useTransferName.ts:143 |
transferToken({ ...common, registryAddress, tokenId, recipient, id }) |
apps/portal/src/features/transfer/helpers/transferToken.ts:67-71 |
encodeFunctionData for ERC-1155 safeTransferFrom with that recipient |
apps/portal/src/features/transfer/helpers/transferToken.ts:79 |
the transaction is sent to registryAddress |
apps/portal/src/utils/token/isNameOrAddress.ts:18-22 |
the sibling that gets it right for one input shape, and names the fallback while doing so |
The one file:line that must change
apps/portal/src/features/roles/helpers/addUser.handlers.ts:29-34
That is the fallback. A name with no addr(60) record has no address; returning the owner of a registry entry that a stranger may have just bought is the defect. Removing that substitution, or gating it so it can never reach a value-moving field, fixes this finding, and nothing else in this report is required.
The contributing line, which is why the substituted owner is a stranger rather than the name's real owner, is apps/portal/src/utils/ens/resolveEnsOwner.ts:83-92: v2 is consulted before v1, so an empty-record v1 name whose label is free in v2 answers with the v2 holder.
The sibling in this repo that gets it right
The repo already knows this fallback over-resolves, and has already patched one narrow case of it, by name. apps/portal/src/utils/token/isNameOrAddress.ts:18-22, verbatim:
* The name must have at least two labels (i.e. contain a `.`). A bare
* single label like `fox` is a valid ENS name string but not a resolvable
* account — only TLDs are single-label — and would otherwise "resolve" via the
* owner fallback in `resolveAddressOrName`.
That is the correct instinct, applied to exactly one input shape. "A name that publishes no address record is not a resolvable account" is the same statement, and it is not made anywhere. isNameOrAddress happily accepts pieslicer.eth, which is ENSIP-15 normalized and has two labels, and the fallback then invents an address for it.
The second sibling is inside the defective function itself. The path resolveAddressOrName tries FIRST, the UniversalResolver addr(60) lookup at addUser.handlers.ts:20-23, is correct: when an addr(60) record exists the fallback is never reached and the record wins. The PoC's read-only control (R5, gomets.eth) prints it:
UR addr(60) = 0x4395BEeC5b4E42d598d55a4bA4EBb04Cc9b58481
app resolveAddressOrName() = 0x4395BEeC5b4E42d598d55a4bA4EBb04Cc9b58481
the owner fallback is not reached at all when addr(60) exists.
So the correct code is the if-branch of the same function and the defect is only the else-branch: instead of "this name does not publish an address, stop", it invents one from registry ownership.
Every confirmation surface, quoted
Nothing here is a display defect, and the claim does not need one, but every surface was opened and is quoted rather than summarised.
Warning banner above the field, SendNameForm.tsx:113-119:
Transferring ownership of an ENS name is irreversible. Make sure you
check the recipient address before proceeding.
The app tells the user to check the address. The address is the attacker's, and checking it against the NAME the user typed tells them nothing, because the app is the thing that made the association.
Recipient field, SendNameForm.tsx:123-135: AddressNameInput with value={recipientInput}. The name is echoed exactly as typed. Correct.
Resolved-address line. AddressNameInput's default status line is apps/portal/src/features/address/components/AddressNameInput.tsx:62-67, `Resolved: ${truncateAddress(address, 6, 4)}`, but the transfer form overrides it via resolvedContent (SendNameForm.tsx:128-134), so the transfer form shows RecipientPreview instead.
RecipientPreview, SendNameForm.tsx:249 and :253-285: renders the resolved hex address IN FULL, truncate={false} at :280. This is the true address the calldata will carry, and it is the attacker's. Above it, :271-275 renders the address's own primary name if it has one; a fresh attacker EOA has none, so that line is absent.
Transaction step titles. apps/portal/src/features/transfer/utils/buildTransferPlan.ts:45-50:
export const STEP_LABELS: Record<TransferStepKind, string> = {
'set-eth-addr': 'Update ETH address',
'detach-resolver': 'Detach resolver',
'detach-registry': 'Detach registry',
'transfer-token': 'Transfer name',
}
and useTransferName.ts:176-177:
title: STEP_LABELS[step],
transactionName: `${STEP_LABELS[step]} - ${name}`,
name here is the name being SENT, the victim's own. The modal is correct about the asset and says nothing about the recipient.
Transaction description, transferToken.ts:88: description: `Transfer ${name}`. Again the sent name, not the recipient.
Wallet prompt: an EOA transaction (transferToken.ts:76-84, type 'eoa', to: registryAddress, value: 0n) to 0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2 carrying selector 0xf242432a, which decodes to safeTransferFrom(from=victim, to=0x0b8ab205Cc4e88352bdc6FC49290e4c31cDA40C7, id=38424076124039839195221280089598108906984212041120748309434213820982934634496, amount=1, data=0x). The recipient hex in the wallet prompt is the same attacker address the page displayed.
Every surface is consistent, and consistently pointed at the attacker. The claim is not "the app displays a different string from the one it uses". The claim is "the address the app derived from the name the victim typed belongs to a stranger who bought it for 8 USDC, and the victim's NFT goes there."
The same defect already misfires on live Sepolia today, with no attacker at all
This section is here because the first thing said about a finding like this one is "the attacker sets bait and hopes". He does not have to. The same code path is already handing out the wrong address, right now, on the live deployment, for names no attacker in this report ever touched.
All reads below are against live Sepolia (https://ethereum-sepolia-rpc.publicnode.com), read-only, at head ~11637762. No fork, no writes, no attacker, no impersonation.
317 live (unexpired), ASCII, deduped v1 .eth 2LD labels were sampled from the newest 3000 v1 registrations, and for each the question asked was whether the label is ALSO registered in the v2 .eth registry to a DIFFERENT address than its v1 owner:
collisions (v1 owner != v2 owner): 14 of 317 readErrors 0
Of those 14, three publish NO addr(60) record, so the shipped resolveAddressOrName takes the owner fallback at addUser.handlers.ts:29-34 and returns the V2 holder, a party who is not the v1 owner and who did nothing wrong:
name v1 registrant v2 owner (what the app returns) UR addr(60)
hello.eth 0xF83Fe2658F702A072f3c7b0DC4A0ab8c7b044750 0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8 null
arthy.eth 0xF83Fe2658F702A072f3c7b0DC4A0ab8c7b044750 0x0aB34352B087a107302aFF5d155e23a11637Caa1 null
reposado.eth 0xF83Fe2658F702A072f3c7b0DC4A0ab8c7b044750 0x74aFE736cF607713bB6aee246b1CB80D6441237c null
Re-run through the shipped resolution order (viem getEnsAddress with the app's universalResolverAddress, then resolveEnsOwner v2-before-v1), live:
hello.eth
UR addr(60) = null
resolveEnsOwner = {"owner":"0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8",
"registryAddress":"0xBDC85dD5b15D7ecb354cd7cb6f2c50b4f2c4F0E2",
"protocolVersion":"ENSv2"}
resolveAddressOrName = 0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8
arthy.eth -> 0x0aB34352B087a107302aFF5d155e23a11637Caa1
reposado.eth -> 0x74aFE736cF607713bB6aee246b1CB80D6441237c
So TODAY, on the live deployment, with no attacker in the picture, a user who types hello.eth into the Explorer's transfer recipient field and sends their name sends it to 0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8, while the party who holds hello.eth in the registry the user is thinking of is 0xF83Fe2658F702A072f3c7b0DC4A0ab8c7b044750. The bug is not a trap an attacker has to lay; it is the app's default behaviour on 3 of 317 sampled live names (0.95%), sitting there right now.
That reframes the attacker in this report's PoC. His one ordinary paid v2 registration is not the cause of the defect. It is one way of SELECTING who benefits from a defect that already misfires without him, on names he never registered, on the deployment as it stands.
Exact repro (read-only, no fork; scripts written to /tmp/ensverify):
cd /tmp/ensverify && node adv-collide.mjs # finds the 14 collisions
cd /tmp/ensverify && NAMES=hello.eth,arthy.eth,reposado.eth node adv-check.mjs
cd /tmp/ensverify && node adv-check2.mjs # isAvailable + both registries
These three scripts are reproduced in full below so the numbers in this section can be re-derived rather than taken on trust.
adv-collide.mjs
import { createPublicClient, http, zeroAddress } from 'viem'
import { sepolia } from 'viem/chains'
import { getEnsAddress } from 'viem/actions'
import { extendChainWithEns, getChainContractAddress } from '@ensdomains/ensjs/chain'
import { getOwner as getOwnerV1 } from '@ensdomains/ensjs/public/v1'
import { getOwner as getOwnerV2 } from '@ensdomains/ensjs/public/v2'
const chain = extendChainWithEns(sepolia)
const pub = createPublicClient({ chain, transport: http('https://ethereum-sepolia-rpc.publicnode.com'), batch:{multicall:true} })
const UR = getChainContractAddress({chain,contract:'ensUniversalResolver'})
const SG='https://v1-graphql.ens.dev/subgraph'
async function page(skip){
const q=`{registrations(first:1000,skip:${skip},orderBy:registrationDate,orderDirection:desc){labelName expiryDate registrant{id}}}`
const r=await fetch(SG,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({query:q})})
const j=await r.json(); if(j.errors) throw new Error(JSON.stringify(j.errors).slice(0,200))
return j.data.registrations
}
const now=Math.floor(Date.now()/1000)
let labels=new Map()
for(let p=0;p<3;p++){
const rows=await page(p*1000)
for(const r of rows){ if(!r.labelName) continue; if(Number(r.expiryDate)<now) continue; if(!/^[a-z0-9-]+$/.test(r.labelName)) continue; if(!labels.has(r.labelName)) labels.set(r.labelName, r.registrant.id) }
if(rows.length<1000) break
}
const arr=[...labels.entries()].slice(0,400)
console.log('checking',arr.length,'live v1 labels for a natural v1/v2 owner collision')
let coll=[],err=0
for(let i=0;i<arr.length;i+=20){
const batch=arr.slice(i,i+20)
await Promise.all(batch.map(async ([label,v1reg])=>{
const name=label+'.eth'
try{
const v2=await getOwnerV2(pub,{name})
if(v2 && v2!==zeroAddress){
const v1=(await getOwnerV1(pub,{name}))?.owner
if(v1 && v1!==zeroAddress && v1.toLowerCase()!==v2.toLowerCase()){
const ur=await getEnsAddress(pub,{name,universalResolverAddress:UR}).catch(()=>null)
coll.push({name,v1,v2,ur})
}
}
}catch(e){err++}
}))
if(i%100===0) process.stdout.write(` ...${i}\n`)
}
console.log('collisions (v1 owner != v2 owner):',coll.length,'readErrors',err)
for(const c of coll.slice(0,15)) console.log(' ',c.name,'v1',c.v1,'v2',c.v2,'UR addr(60)',c.ur)
adv-check.mjs
import { createPublicClient, http, zeroAddress, namehash, labelhash } from 'viem'
import { sepolia } from 'viem/chains'
import { getEnsAddress } from 'viem/actions'
import { extendChainWithEns, getChainContractAddress } from '@ensdomains/ensjs/chain'
import { getOwner as getOwnerV1 } from '@ensdomains/ensjs/public/v1'
import { getNameRegistries, getOwner as getOwnerV2 } from '@ensdomains/ensjs/public/v2'
const RPC = process.env.RPC || 'https://ethereum-sepolia-rpc.publicnode.com'
const chain = extendChainWithEns(sepolia)
const pub = createPublicClient({ chain, transport: http(RPC) })
const C = (n) => getChainContractAddress({ chain, contract: n })
const ADDR = {
ur: C('ensUniversalResolver'), reg: C('ensRegistry'), registrar: C('ensEthRegistrar'),
legacy: C('ensLegacyRegistry'),
}
console.log('block', await pub.getBlockNumber())
console.log('ADDR', ADDR)
async function resolveEnsOwner(name){
const labels = name.split('.')
if (labels[labels.length-1]==='eth' && labels.length>=2){
const [o, r] = await Promise.all([getOwnerV2(pub,{name}).catch(e=>{throw e}), getNameRegistries(pub,{name})])
if (o && o!==zeroAddress){
const ra = r[1]
if (ra && ra!==zeroAddress) return {owner:o, registryAddress:ra, protocolVersion:'ENSv2'}
}
}
const v1 = await getOwnerV1(pub,{name})
if (v1?.owner && v1.owner!==zeroAddress) return {owner:v1.owner, registryAddress:ADDR.legacy, protocolVersion:'ENSv1'}
return null
}
async function resolveAddressOrName(name){
try {
const resolved = await getEnsAddress(pub,{name, universalResolverAddress: ADDR.ur})
let a = resolved
if (!a){ const o = await resolveEnsOwner(name); a = o?.owner ?? null }
return a
} catch(e){ console.log(' THREW:', e.shortMessage||e.message); return null }
}
const names = (process.env.NAMES||'pieslicer.eth,degens.eth,thealliance.eth,studio.eth,gomets.eth').split(',')
for (const n of names){
const label = n.split('.')[0]
let avail=null
try { avail = await pub.readContract({address:ADDR.registrar, abi:[{name:'available',type:'function',stateMutability:'view',inputs:[{type:'string'}],outputs:[{type:'bool'}]}], functionName:'available', args:[label]}) } catch(e){ avail = 'ERR:'+(e.shortMessage||e.message).slice(0,60) }
let ur=null; try { ur = await getEnsAddress(pub,{name:n, universalResolverAddress:ADDR.ur}) } catch(e){ ur='THREW:'+(e.shortMessage||e.message).slice(0,80) }
const own = await resolveEnsOwner(n)
const raon = await resolveAddressOrName(n)
console.log(`\n${n}\n registrar.available = ${avail}\n UR addr(60) = ${ur}\n resolveEnsOwner = ${JSON.stringify(own)}\n resolveAddressOrName = ${raon}`)
}
adv-check2.mjs
import { createPublicClient, http, zeroAddress } from 'viem'
import { sepolia } from 'viem/chains'
import { extendChainWithEns, getChainContract
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 address-resolution helper substitutes the registry owner for a missing address record, and its owner lookup checks the v2 registry before v1, so a free v2 label decides the address.
Impact
A user transferring a name to a recipient typed by name could have the name token sent to a stranger; the report notes the full recipient address is displayed, so a careful user comparing it out of band could catch it, and it also shows the same misfire already occurring on live Sepolia for three sampled names.
What the attacker needed
Attacker pays for a v2 registration; victim types the name as recipient; victim signs the transfer
The fix
The owner fallback should be removed, or gated so it can never feed a value-moving field, so a name without an address record resolves to nothing.
How it was found
- Pick a live v1 .eth name with no address record whose label is free in the v2 registry.
- Register that label in the v2 registry with an ordinary paid registration, setting no records.
- Wait for a user to type that name into the transfer recipient field.
- The app derives the attacker's address from the name and the user signs the transfer.
- The name token moves to the attacker.
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 point to a wallet address, but some names do not set one. The app, instead of saying 'this name has no address', borrowed the address of whoever owns the name in a second, newer registry. Because that second registry lets anyone register a label that is still free there, a stranger could claim the label and become the address the app hands out.
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.