Skip to content
Business logic Audit finding Advanced

Post-confirmation Unicode normalization substitutes an attacker-owned primary name, causing Manager to render an attacker-controlled Optimism recipient.

sl1de Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

90544 w a critical post confirmation unicode normalization substitutes an attacker owned primary name causing manager to render an attacker controlled optimism recipient

Submitted on Aug 25th 2026 at 15:51:17 UTC by @sl1de for Audit Competition | ENS

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

Manager preserves a raw decomposed Unicode (NFD) ENS name through registration, Dashboard ownership display, selection, and confirmation, but setPrimaryNameWithHca normalizes it to the composed NFC form only when constructing the owner-signed calldata. The joined local proof shows that these canonically equivalent strings identify distinct on-chain registrations: the victim owns the selected NFD name while the attacker owns the NFC name ultimately written as the victim’s primary name. By setting the NFC name’s ETH record to the victim, the attacker makes Manager’s production getEnsName call return the attacker-owned NFC name for the victim; an independent ENSjs strict-resolution control reports the same name with match=true. The attacker can simultaneously set that name’s Optimism record to an attacker-controlled address. A sender who starts from the victim’s address profile is therefore directed to a profile where Manager renders and copies the attacker’s address as the chain-specific Optimism recipient. Funds sent using that copied address go to the attacker instead of the intended victim.

Vulnerability Details

Attack scenario

There are three relevant actors:

  • The attacker owns the composed NFC name and controls its resolver.
  • The victim owns the visually identical decomposed NFD name and uses Manager’s normal primary-name flow.
  • A sender relies on Manager’s receiving-address UI to obtain the victim’s Optimism address.

For example, these names render identically but contain different Unicode code points:

  • Victim-owned raw NFD: e\u0301-hca-1811111111.eth (U+0065 U+0301)
  • Attacker-owned NFC: \u00E9-hca-1811111111.eth (U+00E9)

The strings are canonically equivalent:

NFD.normalize("NFC") == NFC

However, their raw labels produce distinct registrar identities and can be registered to different owners.

The complete attack is:

{% stepper %} {% step %}

Register the NFC name

The attacker registers the NFC name and retains control of its resolver. {% endstep %}

{% step %}

Register the raw NFD name

The victim registers the visually identical raw NFD name using Manager’s accepted registration path. The frozen parser, availability call, and EOA/HCA builders preserve the raw bytes, and the fork proves the resulting raw registration remains distinct from NFC. {% endstep %}

{% step %}

Point the NFC ETH record to the victim

The attacker sets the NFC name’s ETH record, coin type 60, to the victim’s public EVM address. {% endstep %}

{% step %}

Select the NFD name in Manager

Manager’s Dashboard displays the victim-owned NFD row using Panoptes’ raw name field.

The victim selects that row as their primary name and approves the normal owner-signed HCA operation. {% endstep %}

{% step %}

Normalize after confirmation

Only after confirmation, setPrimaryNameWithHca calls viem/ens.normalize, changing the selected NFD string into the attacker-owned NFC string.

Manager encodes and submits setNameWithHCA(victimAddress, NFCName). {% endstep %}

{% step %}

Retain distinct ownership

The victim retains ownership of the NFD name, while the attacker retains ownership and resolver control over the NFC name. {% endstep %}

{% step %}

Pass reverse resolution

Reverse resolution for the victim succeeds because Manager verifies only the default ETH record, and the attacker deliberately keeps NFC’s ETH(60) record equal to the victim. {% endstep %}

{% step %}

Set an attacker-controlled Optimism record

The attacker sets NFC’s Optimism record, coin type 2147483658, to the attacker’s EVM address. This does not invalidate the ETH reverse match. {% endstep %}

{% step %}

Open the victim profile

A sender opens the victim’s address profile and follows Manager’s “View profile” link for the strictly resolved primary name. {% endstep %}

{% step %}

Render and copy the attacker recipient

Manager fetches the NFC name’s ETH and Optimism records. It treats ETH as the main receiving address and the differing attacker-controlled Optimism value as a “Chain-specific address.”

Clicking the Optimism card copies the attacker’s complete address to the clipboard. An Optimism payment made using that value goes to the attacker rather than the intended victim. {% endstep %} {% endstepper %}

The resulting identity transition is:

Victim selects and confirms victim-owned NFD name
                         |
                         v
Manager normalizes after confirmation
                         |
                         v
Owner-signed calldata contains attacker-owned NFC name
                         |
                         v
NFC ETH(60) = victim, so strict reverse match succeeds
                         |
                         v
NFC Optimism record = attacker
                         |
                         v
Manager renders and copies attacker as Optimism recipient

The attacker can subsequently rotate the Optimism record without further victim interaction because the attacker still owns the NFC name and controls its resolver.

No compromised RPC, indexer, backend, wallet, HCA, session, private key, or privileged contract role is required.

Reachability prerequisite 1: registration preserves non-canonical label bytes

The registration parser uses a variable called normalized, but only trims and lowercases the input:

TypeScript
const normalized = name.trim().toLowerCase()

The URL helper similarly adds .eth and truncates the label without applying ENSIP-15 normalization:

TypeScript
export function normalizeDomainNameFromUrl(name: string): string {
  const label = name.toLowerCase().endsWith('.eth')
    ? name.slice(0, -4)
    : name

  return truncateToMaxBytes(label, MAX_DOMAIN_BYTES) + '.eth'
}

Neither parseName nor validateENSName requires the supplied string to equal its canonical ENSIP-15 form.

On the HCA registration path, cleanLabel removes only the .eth suffix:

TypeScript
const cleanLabel = (name: string): string => name.replace(/\.eth$/, '')

The unchanged label is then passed to the registrar:

TypeScript
args: [
  params.label,
  params.wallet,
  params.secret,
  ZERO_ADDRESS,
  params.resolver,
  params.duration,
  c.usdc,
  REFERER,
]

The frozen ENSjs availability export was also verified to call isAvailable with the decomposed label unchanged. Consequently, the target permits registration of the raw NFD label even when its NFC equivalent is already separately registered.

Reachability prerequisite 2: Dashboard selects the raw victim-owned registration

Panoptes exposes name and normalizedName separately. A bounded run of the real Panoptes implementation against a raw NFD registration on the local fork returned the victim-owned row in this form:

JSON
{
  "name": "e\u0301-indexer-1788888888.eth",
  "normalizedName": "\u00e9-indexer-1788888888.eth",
  "owner": {
    "id": "0xc9eec1b174a646d7c282820afe94acfba6c00a12"
  }
}

The Panoptes control used a pinned image and a test-only contract-address override matching the frozen deployment. It independently proves the raw and normalized field behavior used by the Dashboard test; it does not claim byte identity with an undisclosed production indexer build.

Manager deliberately prefers the raw field:

TypeScript
export const resolveDomainLabel = (domain: {
  id: string
  name?: string | null
  normalizedName?: string | null
}): string => domain.name ?? domain.normalizedName ?? domain.id

ChoosePrimaryNameDialog renders that value and uses it as the selected identity:

TypeScript
const label = resolveDomainLabel(domain)

<button
  aria-label={t`Select ${label} as primary name`}
  onClick={() => onSelectName(label)}
>
  {label}
</button>

After the normal resolver/address preflight, that same raw value is submitted:

TypeScript
await submitPrimaryName({
  name: selectedName,
  owner: account.ownerAddress as Address,
})

At this point, the displayed, selected, and preflight-checked registration is still the victim-owned raw NFD name.

Root cause: the selected identity changes only after confirmation

The submitted root cause is that Manager re-derives the identity after confirmation and changes the selected namehash without binding the signed operation to the selected owned registration.

The HCA primary-name service applies viem/ens.normalize after the raw name has already been selected and confirmed:

TypeScript
const withEthSuffix = (name: string) =>
  normalize(name.endsWith('.eth') ? name : `${name}.eth`)

It then uses the changed string as the final contract argument:

TypeScript
const cleanName = withEthSuffix(name)

data: encodeFunctionData({
  abi: reverseAdapterAbi,
  functionName: 'setNameWithHCA',
  args: [ownerAddress, cleanName],
})

The wallet check verifies that the signer controls ownerAddress, but there is no check that cleanName still represents the same on-chain registration selected in the dialog or that the victim owns the normalized name.

The resulting request is submitted through an owner signer and the production transaction manager:

TypeScript
const ownerSigner: RhinestoneSigner = {
  ...signer,
  session: undefined,
}

const txId = transactionManager.startTransaction(
  { type: 'custom', request },
  ownerSigner,
  {
    description: `Set primary name to ${cleanName}`,
    operation: 'set-primary-name',
    name: cleanName,
  },
)

Normalizing an ENS name is not itself the vulnerability. The vulnerability is performing that normalization only after an ownership-bearing raw registration has already been displayed, checked, selected, and confirmed, without checking whether normalization changes it into a registration owned by another account.

The required invariant is:

selected registration == confirmed registration == signed primary identity

The vulnerable flow instead produces:

selected and checked registration = victim-owned NFD
signed primary identity           = attacker-owned NFC

Because the two strings render identically, ordinary rendered-name comparison gives the victim no visual indication of the code-point change.

Impact-enabling trust mismatch: strict reverse verification covers ETH but not Optimism

Manager resolves an address’s primary name using:

TypeScript
getEnsName(client, { address })

It does not supply a coinType, so the strict bidirectional check uses the default ETH coin type 60.

The attacker preserves:

Attacker-owned NFC ETH(60) = victim address

Manager’s production getEnsName call therefore returns the attacker-owned NFC name for the victim. The separate ENSjs strict-resolution control returns { name: NFCName, match: true }, confirming why the Universal Resolver accepted it.

That verification places no constraint on:

Attacker-owned NFC Optimism(2147483658) = attacker address

This is not a fail-open in the ETH check. The guard correctly checks equality of the default ETH(60) forward record; it establishes neither name ownership nor the other coin records.

The negative control confirmed this boundary:

  • Changing NFC’s ETH record from the victim to the attacker produced ReverseAddressMismatch and removed the victim’s primary result.
  • Changing only the Optimism record left the strict victim match intact.

Impact sink: Manager propagates the substituted identity into a copyable Optimism receiving address

The victim address route uses the strict reverse result as its primary name:

TypeScript
const resolvedName = await queryClient.ensureQueryData(
  profileReverseNameQuery(address),
)

return <AddressProfileView address={address} primaryName={resolvedName} />

The address profile then presents a “View profile” link to that resolved name.

The profile service probes Manager’s complete supported address catalogue, including Optimism, even if the indexer reports no coin records:

TypeScript
const coins = unique([
  ...alwaysProbeAddressRecords.map(Number),
  ...addressRecords.map((record) => record.coinType),
  ...indexerRecords.coins,
])

const records = await getRecords(client, {
  name,
  coins,
  contentHash: true,
  abi: true,
  ignoreInvalidCoinTypes: true,
})

Optimism is explicitly supported as coin type 2147483658.

Manager chooses ETH as the main receiving address and classifies every differing record as chain-specific:

TypeScript
const mainAddress =
  addresses.find((address) => address.coinType === ETH_COIN_TYPE) ??
  addresses[0]
TypeScript
return getAddressItems(records)
  .filter((address) => address.value.toLowerCase() !== mainValue)

The resulting value is rendered under “Chain-specific addresses” and passed unchanged into CopyableButton:

TypeScript
<CopyableButton value={address.value}>
  <ChainAddressValue value={address.value} />
</CopyableButton>

The click handler copies the complete value rather than the abbreviated visible representation:

TypeScript
await copyToClipboard(value)

There is no Optimism-specific verification binding this copied recipient to the victim whose ETH strict-reverse result led the sender to the profile.

Verified joined production-path proof

I reproduced the security-relevant chain through complementary joined proofs in a private local Sepolia fork. The complementary legs cover the frozen registration exports, a real Panoptes indexer control, the production Dashboard selection and primary-name service, HCA and transaction-manager execution through the local Warp/mockestrator path, real ENS registry and resolver state, production profile transformation, receiving-address rendering, and the production clipboard handler. Each mocked boundary is identified below and in the PoC.

The target was competition import cda79acaad59711b943fc68207ebb3f1d0ff8596, which imports upstream commit 63772fd872af472ced58b009499355f3430c2a86.

Item Verified result
Victim-selected raw name e\u0301-hca-1811111111.eth
Final owner-signed primary name \u00E9-hca-1811111111.eth
Raw NFD owner Victim: 0xc9eec1B174A646D7c282820aFE94AcfBA6c00A12
NFC owner Attacker: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
HCA/transaction-manager result Successful fill
Fill transaction 0x0d8e3da3c75cb15ce030c919ac52ffe2451ee292a0905c15625f577043ee1c19
Manager getEnsName result Attacker-owned NFC name
Independent ENSjs strict control Attacker-owned NFC name with match=true
Manager main ETH recipient Victim address
Optimism coin type 2147483658
Manager Optimism recipient Attacker address
Clipboard result Exact full attacker address
ETH negative control Repointing ETH to attacker caused ReverseAddressMismatch

The clean joined component-to-fork run passed five tests across three files and exited successfully. The same fork state was preserved from the owner-signed HCA operation through the Manager record read, profile transformation, card rendering, and clipboard assertion. The additional frozen-package tests prove that Manager's parser, availability call, and both registration builders preserve the raw decomposed label.

The only mocked record-data response in the live recipient test is an empty Panoptes cache response. The mocked safeGetClient boundary injects the real local-fork client, and the happy-dom test environment’s navigator.clipboard.writeText is replaced with an observer; neither supplies an ENS or profile value. ENSjs, RPC, registry ownership, reverse resolution, ETH/BTC/Optimism record reads, profile transformation, address-card rendering, and the production copy handler all use the real local-fork state. Manager statically probes supported coin types, so an empty indexer coin list does not suppress the Optimism record.

BTC coin type 0 was also set to and copied as an attacker-selected recipient, confirming that the weakness is a general cross-coin identity split rather than an Optimism formatting issue.

Difference from known issue EXP-INPUT-005

This report does not submit the known EXP-INPUT-005 validator/display-confusion issue.

EXP-INPUT-005 is described as a Medium issue involving validators accepting visually confusing Unicode, bidi/control characters, and leading or trailing dots. Raw registration acceptance is only a prerequisite here, not the submitted root cause. The new root cause is that Manager changes an already selected, ownership-bearing registration into a different actor’s registration after confirmation and then trusts that substituted identity across coin types. This produces a materially different consequence:

  • Two distinct on-chain registrations are owned by different actors.
  • Manager displays and preflight-checks the victim-owned raw registration.
  • After confirmation, Manager signs the attacker-owned canonical identity.
  • The attacker-owned name is accepted as the victim’s strict ETH primary result.
  • Manager resolves, renders, and copies an attacker-controlled Optimism recipient from that substituted identity.

The competition rules state that materially severity-changing consequences of known issues remain eligible. They also specifically state that incorrect resolution beyond EXP-INPUT-005 is new and identify cross-chain resolver disagreement, including Optimism, as part of the Critical wrong-recipient attack surface.

Preconditions and boundaries

The following requirements are explicit:

  • The attacker must own the composed NFC name and control its resolver.
  • The victim must own or register the visually equivalent raw NFD name.
  • The victim must select that name as primary and approve the normal owner-signed request.
  • The attacker must keep NFC’s ETH(60) record pointed at the victim.
  • A sender must open the victim-linked profile and use the displayed/copied Optimism recipient.

The following are not claimed:

  • The attacker does not take ownership of the victim’s raw NFD name.
  • The attacker does not mutate the victim’s resolver.
  • The attacker does not compromise the victim’s wallet, HCA, or session.
  • Manager does not automatically broadcast the subsequent Optimism payment.
  • The PoC does not claim that funds were transferred on a public network.
  • A careful sender who separately inspects the NFC name’s registry owner could notice the discrepancy.

These boundaries do not remove the selected impact. Manager resolves a victim-linked primary identity to an attacker-controlled cross-chain receiving address and supplies that exact unintended recipient through its normal copy action.

Recommended remediation

{% stepper %} {% step %}

Normalize at all identity boundaries

Apply ENSIP-15 normalization before availability, registration, indexing, display, selection, and every other identity boundary. Reject input when normalization changes the supplied bytes. {% endstep %}

{% step %}

Bind selection to registration ownership

Before requesting a primary-name signature, bind the transaction to the exact selected registration ID and recheck its live owner. {% endstep %}

{% step %}

Require explicit re-selection after normalization

If normalization changes the selected registration, stop and require a new explicit selection rather than silently continuing. {% endstep %}

{% step %}

Validate chain-specific receiving addresses

Do not treat an ETH-only strict reverse match as validation of chain-specific receiving addresses. Either verify each chain-specific association independently or clearly warn that those addresses are not bound by the ETH reverse check. {% endstep %}

{% step %}

Add regression coverage

Add regression tests using canonically equivalent names owned by different accounts. {% endstep %} {% endstepper %}

Impact Details

This maps directly to the selected Critical Websites & Applications impact:

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, including resolving or rendering an ENS name to an attacker-controlled address.

From the attacker’s perspective, the attacker retains ownership of the substituted NFC name, points its ETH record at the victim so the ETH strict-reverse check succeeds, and independently controls the Optimism receiving address.

From the victim’s perspective, the victim selects and approves their own raw NFD registration in Manager, but the signed primary-name operation instead associates their address with the attacker’s canonically equivalent NFC name.

From the sender’s perspective, Manager accepts the attacker-owned name as the victim address’s strict primary result, directs the sender to its profile, labels the attacker’s Optimism record as a chain-specific receiving address, and copies the complete attacker address. A payment made using that recipient goes to the attacker instead of the intended victim.

The possible loss is the amount the sender transfers using the substituted Optimism recipient. The attacker can rotate that record later while preserving the ETH record required for the victim’s strict reverse match.

This report deliberately selects only the program’s wrong-address/wrong-recipient Critical impact. It does not additionally claim direct theft, HCA takeover, name ownership takeover, or an automatically submitted malicious transaction.

No smart-contract vulnerability is claimed. The contracts are used only to demonstrate execution of the client-generated primary-name argument on a private fork.

References

Proof of Concept

Safety and environment

This proof runs entirely against a private local Anvil fork using throwaway test accounts. It does not send transactions to public Sepolia, Optimism, or any other public chain. It does not use production funds, names, wallets, sessions, target or production API credentials, or the public Rhinestone service. The evaluator supplies a researcher-controlled Sepolia RPC endpoint only as Anvil's read-only upstream state source.

The runner requires SEPOLIA_FORK_URL to be supplied explicitly and exits if it is absent. This prevents it from silently using any provider URL or credential committed in the repository. Anvil uses the supplied endpoint only to read the Sepolia state needed to create the local fork.

The joined exploit runner starts only the repository's pinned anvil and mockestrator containers. It:

  • Refuses to touch pre-existing running Anvil or mockestrator services.
  • Waits until both pinned services are healthy.
  • Creates an outer evm_snapshot.
  • Executes the exploit and component assertions.
  • Reverts the snapshot in an exit trap.
  • Stops only the two services it attempted to start, including after a startup or test failure.

A separate bounded Panoptes control uses the same pinned Anvil plus an exact Panoptes image digest, isolated container names, and an isolated Docker volume. It removes only those resources after the control completes or fails.

The standard Anvil development accounts and keys used by the proof are throwaway local-chain values.

PoC evidence bundle

The complete runnable PoC and captured verification logs are available here:

[Download ens-unicode-primary-poc.zip from Google Drive](https://drive.google.com/file/d/1yYwv7gdPkAoFTj6DbqHRtID7_

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

What is known

A critical-severity business logic bug in https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/manager. Immunefi made it public on 25 August 2026.

About Business logic

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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 sl1de

View all

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