Api-worker: user_channels never enforces one verified owner per email target
The email channel claim and verify routes never enforce that only one verified owner exists per address, because the cross-user guard only checks verified rows and the verify step does not re-check ownership. An attacker can claim any unverified address, have ENS send a genuine confirmation mail, and once the recipient clicks it the address becomes bound to the attacker's account, blocking the real owner from linking it.
- Disclosed after under an hour
91487 w a low api worker user channels never enforces one verified owner per email target
Submitted on Sep 1st 2026 at 22:32:04 UTC by @zaaf for Audit Competition | ENS
- Report ID: #91487
- Report Type: Websites & Apps
- Report severity: Low
- Target: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/workers
- Impacts:
- Changing sensitive details of other users (including modifying browser local storage) without already-connected wallet interaction and with up to one click of user interaction, such as: Email
Description
Brief/Intro
The invariant is that at most one verified owner may exist for (channel='email', target), and neither the application nor the schema enforces it. Its only unique constraint is user_channel_unique on (user_id, channel, target) (core/database/schema/notifications.ts:74), and the cross-user guard on POST /notifications/channels/email filters on status = 'verified' (app/routes/notifications/channels/email.ts:59-65), so a pending claim is invisible to it. POST /notifications/channels/email/verify then resolves a token and flips the row that token names, without re-asking whether the address has been claimed since the token was minted (email.ts:179-201).
Any authenticated account can therefore claim any address no other account has verified; ENS composes the confirmation mail and hands it to SendGrid itself; one click by the recipient binds the address to the claiming account, and the address's real owner is then refused when they try to link it. Downstream, the SendGrid event webhook and the push delivery service locate a channel with where target = … and no owner predicate, so a genuine signed provider event lands on whichever row the database happens to return.
The work was done at 1c9b47f, the head of audit-comp-ready, whose tree is the audited revision 63772fd872af472ced58b009499355f3430c2a86 plus one dependency bump (d35fbdf, hono 4.12.18 to 4.12.34).
Vulnerability Details
Missing control: a relationship between the caller and the address at claim time, a re-check of that claim at verify time, and an owner predicate on the four queries that later locate a channel by its target string.
Where, in workers/api-worker/src:
app/routes/notifications/channels/email.ts:59-65: the cross-user guard readsand(eq(channel,'email'), eq(target,email), eq(status,'verified')). Apendingrow is invisible to it, so two accounts can hold the same address at the same time.app/routes/notifications/channels/email.ts:75-97: the row is written for the caller with no check of any kind that the caller can receive mail at that address.app/routes/notifications/channels/email.ts:179-201: verify resolves the token globally and flipsuser_channels.statustoverifiedbyverification.channel_id. Between the mail being sent and the link being clicked the address can have been verified by somebody else, and nothing here looks.app/routes/webhook/sendgrid.ts:172-174:findFirst({ where: eq(TABLE.userChannels.target, event.email) }). Nouser_id, noeq(channel,'email'), noorderBy. Lines 188-231 then writebouncedorunsubscribedonto whichever row that returned.services/delivery/push.ts:54-59: the same shape, reading thedatacolumn, which holds the Web-Push encryption keys used to encrypt one user's notification.services/delivery/push.ts:118-124:update(userChannels).set({status:'unsubscribed'}).where(eq(target, …)).queues/dlq.ts:202-209:update(userChannels).set({status:'bounced'}).where(eq(target, delivery.target)), with no owner predicate, no channel-type predicate and no limit. Seven lines earlier,:199updatesnotification_deliveriesby id. This one is listed as the same root cause in a fourth place; no reachable trigger for it is claimed, becauseclassifyDeliveryErrorreacheshard_bounceonly on a provider string about a mailbox that does not exist, and the attacker supplies no part of that string.
Discriminating control: the same codebase does it correctly one file away. app/routes/notifications/channels/$id.ts:39-42 reads:
where: and(
eq(TABLE.userChannels.user_id, userId),
eq(TABLE.userChannels.id, channelId),
),
The sibling handlers at :117-122 and :150-155 do the same. The claim route is not careless about ownership either: it scopes its own-row lookup by user_id (email.ts:40-46) and the verify route updates by verification.channel_id (:201). What is absent is narrower than a missing user_id predicate: it is any statement, in code or in the schema, that a verified binding on an address belongs to one account.
Rather than cite that guard, the proof of concept runs it: against an address a user has already verified, the attacker's POST returns 400 {"error":"This email address is already linked to another account"} and no row is written. It exists, it fires, and every 200 below is measured against a gate that demonstrably works.
Excluded-premise check: the attacker does not send, modify or host the message or the link, and the application itself solicits the only interaction the exploit uses.
Known-issue check. R2-05 is "SendGrid event webhook fails open when the verification key is unset". That is a different root cause and it is fixed on this revision: webhook/sendgrid.ts:110-116 returns 500 when the key is missing or whitespace, and the unsigned-request control below returns 401. What is reported here is a post-verification authorization defect on the same handler: a correctly signed, genuinely-from-SendGrid event resolves to the wrong owner.
R2-04 is the Explorer OG-image worker. EXP-INPUT-009 is the Manager's handling of a push notification click. R3-05 through R3-08 are packages/transaction-manager state-machine entries. Counted across the whole corpus, workers/api-worker receives two of the twenty-five Part 1 entries, R2-05 and R2-04, and neither concerns channel registration, channel verification or the delivery queues. No Part 2 QA or bug-tracker entry touches them either.
Impact Details
The chain, in the order it runs:
- An account with no relationship to an address posts that address to
POST /notifications/channels/email. - A
pendingrow is written for the caller. - ENS itself composes a genuine confirmation mail and hands it to SendGrid, from its own sender, for delivery to that address.
- The recipient clicks the confirmation link once.
- The token parsed out of the captured mail drives one unauthenticated
POST /notifications/channels/email/verify. - The row flips to
verified. - The real owner of the address is refused with
400 {"error":"This email address is already linked to another account"}when trying to link the same address.
Two requests separate the claim from the binding, one on the attacker's bearer and one unauthenticated, and the run asserts that no request at all is made with the address owner's session.
The object that changes is the binding, not the string. The security-sensitive object here is not the email address, which the attacker supplied and already knew. It is the verified ownership binding between an account and an address, and the application accepts the recipient's verification click as proof of authority for an account that is not theirs. That binding is what status = 'verified' means everywhere else in this worker: it is the predicate the delivery fan-out selects on (queues/event-ingestion.ts:279-283), the predicate the cross-user guard trusts, and the thing the address owner loses.
After the click the attacker's account holds it, and the victim's account cannot obtain it through the linking route.
The row this sits on, in the programme's own words: "Changing sensitive details of other users (including modifying browser local storage) without already-connected wallet interaction and with up to one click of user interaction, such as: Email". What changes for the address owner is which account the platform treats as the verified owner of their email, and with it their ability to use their own address on the platform at all. That one click is the allowance the row itself grants, and it is spent on ENS's own confirmation link rather than on anything the attacker wrote. No wallet interaction is involved at any point.
What is and is not mutated. Read strictly, "changing sensitive details of other users" can be taken to require a mutation of a record the victim owns, and in the one-click chain no victim-owned row is mutated. What is mutated is the binding, and with it the victim's ability to use their own address: the attacker's row becomes verified on the victim's address, and the victim's own POST is refused. A row the victim owns is mutated only in the two-row state, which needs a second click, is labelled separately below and is not counted toward this row.
Attacker: any holder of a session, obtained by signing SIWE with a wallet they generate themselves. No allow-list, no funds, no name, no prior relationship to the victim. The proof of concept generates its wallets in the file and obtains every session through POST /auth/nonce and POST /auth/login.
Victim: the owner of an email address that is not currently verified on the platform.
User interaction: exactly one, by the victim, on an authentic ENS confirmation email they did not request. The run measures that count rather than asserting it: from the claim to the binding it records two requests, one POST /notifications/channels/email carrying the attacker's bearer and one unauthenticated POST /notifications/channels/email/verify carrying the token parsed out of the mail, and zero requests carrying the address owner's session.
Gain (measured): with that one click the address is bound to the attacker's account as one user_channels row, user_id = the attacker, status = verified, and the address's owner is refused when they try to link it. Nothing in the product surfaces the row that is holding their address, because every :id channel route is scoped to the caller ($id.ts:39-42, :117-122, :150-155).
Both arms that measure that sit in the two-row state below, where the address owner's own channel list returns one entry, theirs, and DELETE /notifications/channels/<the other account's row> returns 404. From then on, ENS notification mail generated by the attacker's account is delivered by ENS's verified sender to the victim's mailbox.
One route back exists, it was measured, and the product never names it. While the attacker's row is the only row, a spamreport against that mail marks it bounced, and the address owner's next POST then succeeds (200). A recipient who thinks to mark the mail as spam recovers the address. Nothing in the interface tells them that, and the error message they see offers no path at all.
A further demonstrated consequence, which needs a second click and is not counted toward the row above. If the recipient clicks both of the identical ENS confirmation mails, their own and the attacker's, the end state is two verified rows, two user_ids, one target, created entirely through the shipped routes. In that state the recovery above inverts.
A genuine ECDSA-P-256-signed SendGrid spamreport for that address disabled the address owner's row in every one of the six trials the proof of concept runs, on each of three separately created databases; a signed unsubscribe, the footer of the very mail the attacker caused, did the same. Afterwards the owner's own expiry notification queues zero email deliveries while the attacker's channel stays verified and keeps sending, and the owner has no self-service repair:
POST /notifications/channels/<their row>/resendreturns400because the row is notpending($id.ts:161-171).- Re-adding the address meets the same guard as before.
What the query decides and what it does not. sendgrid.ts:172 carries no orderBy, so which of the two rows is returned is PostgreSQL's choice and not the application's. In the configuration pinned below it was the address owner's row in 6/6 trials on all three databases. The reverse click order is printed without being asserted, because it came out ["VICTIM","VICTIM","VICTIM"] on one of those databases and ["attacker","attacker","attacker"] on the other two. Both observations say the same thing about the code: nothing in it expresses a preference for the legitimate owner.
Executed end-to-end: yes, through the shipped app object from src/app/index.ts, the shipped SIWE service, the shipped channel routes, the shipped webhook handler with real ECDSA-P-256 signature verification, and the shipped createNotification service, against a PostgreSQL loaded with this repository's own migrations. Production runs on Neon, which is PostgreSQL (src/core/database/index.ts:4).
Nothing left this machine: globalThis.fetch is replaced for the whole run by a stub that answers api.sendgrid.com in process and throws for every other host, and the run asserts that the real fetch was never reached.
Verified out of band: every state claim is read back from the database with SQL against user_channels, channel_verifications, notifications and notification_deliveries, not taken from a route's response body. The one claim that is deliberately not read from the database is the confirmation token: that comes from the captured mail body, so the click is measured as the recipient would perform it.
Not claimed. The victim's email address is not disclosed to the attacker by this defect. An attacker supplies the address rather than learning it, and no route returns another user's channel target (services/notifications/helpers.ts:19-27,141,162 maps a push endpoint to an unsalted endpointHash and every channel route is user_id-scoped). What the endpoint does disclose is whether a given address is already verified on another account: the same request returns 400 for such an address and 200 for one nobody holds, and both arms are asserted below.
Nothing here is claimed to affect a name, a registration, a renewal or any on-chain state, and no measurement in this work connects a disabled notification channel to a lost name. The in-app notification is still created and GET /notifications still returns it. Only the external delivery is lost, and both halves of that are asserted below rather than glossed.
The push channel, and why it is a paragraph and not a report. channels/push.ts:71-77 scopes its duplicate check to eq(user_id, userId). It has no cross-user check at all, where email.ts:59-65 one file over has one, and :112-113 inserts the new row status: 'verified' outright. So a second account can claim a push endpoint with no click and no confirmation, which makes services/delivery/push.ts:54-59 hand one user's notification to another user's encryption keys.
Doing that needs the victim's Web-Push endpoint URL, which is a bearer capability this application never discloses; no path to it was found and none is claimed. No such secret is needed by the email variant above. queues/dlq.ts:209 has no channel-type predicate either; today no string satisfies two of the three target namespaces at once (isAllowedPushEndpoint, a Telegram id, and v.email()), so that one is recorded as latent rather than live.
References
workers/api-worker/src/app/routes/notifications/channels/email.tslines 40-46, 59-65, 75-97, 104-120, 126-140, 179-201workers/api-worker/src/app/routes/notifications/channels/$id.tslines 39-42, 117-122, 150-155, 161-171workers/api-worker/src/app/routes/notifications/channels/push.tslines 71-77, 79-98, 101-113workers/api-worker/src/app/routes/webhook/sendgrid.tslines 110-116, 128-152, 167-239workers/api-worker/src/services/delivery/push.tslines 54-59, 118-124workers/api-worker/src/services/email/verification.tslines 16, 20-24, 26, 30-38: whereverificationUrlis assembled and placed in the message the proof of concept capturesworkers/api-worker/src/services/email/utils.tslines 8, 27-39: thePOST https://api.sendgrid.com/v3/mail/sendthe capture interceptsworkers/api-worker/src/queues/dlq.tslines 195-209workers/api-worker/src/services/notifications/create.tslines 116-123workers/api-worker/src/queues/event-ingestion.tslines 279-283: the scheduled fan-out applies the same verified-only filterworkers/api-worker/src/core/database/index.tsline 4workers/api-worker/src/core/database/schema/notifications.tsline 74:user_channel_uniqueis(user_id, channel, target), so the schema permits two owners of one target by construction
Proof of Concept
workers/api-worker/src/poc/email-channel-ownership.poc.ts, reproduced in full at the end of this section, with its pinned output workers/api-worker/src/poc/EXPECTED_email-channel-ownership.txt.
It drives the shipped app object directly, with no HTTP server, no proxy and no rewriting of any route, and prints one PASS line per load-bearing claim, including the negative controls and the network boundary.
Prerequisites
One local service. It reaches no public network.
docker run -d --name poc-pg -p 55432:5432 \
-e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres postgres:16
The repository's migrations open with CREATE EXTENSION IF NOT EXISTS pg_uuidv7; and this repository's own Dockerfile builds that extension from source. To keep the reproduction offline, a pure-SQL uuid_generate_v7() is supplied instead and the extension line is skipped; nothing else about the schema is changed, and every migration file is applied verbatim. Paste this exactly:
docker exec -i poc-pg psql -U postgres -q <<'SQL'
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE OR REPLACE FUNCTION uuid_generate_v7() RETURNS uuid AS $$
SELECT encode(
set_bit(
set_bit(
overlay(uuid_send(gen_random_uuid())
placing substring(int8send(floor(extract(epoch from clock_timestamp()) * 1000)::bigint) from 3)
from 1 for 6),
52, 1),
53, 1), 'hex')::uuid;
$$ LANGUAGE sql VOLATILE;
SQL
cd workers/api-worker
for f in drizzle/0000_*.sql drizzle/0001_*.sql drizzle/0002_*.sql drizzle/0003_*.sql drizzle/0004_*.sql; do
sed 's/CREATE EXTENSION IF NOT EXISTS pg_uuidv7;/SELECT 1;/' "$f" \
| sed 's|--> statement-breakpoint||' \
| docker exec -i poc-pg psql -U postgres -v ON_ERROR_STOP=1 -q
done
If you prefer the repository's own container, docker compose -f workers/api-worker/compose.yaml up -d postgres ships pg_uuidv7 and needs no shim; only the port changes.
Reproduction
pnpm install --frozen-lockfile
cd workers/api-worker
./node_modules/.bin/vitest run --config vitest.poc.config.ts \
--silent=false --disableConsoleIntercept src/poc/email-channel-ownership.poc.ts
What each numbered step does, and who does it
The proof of concept performs all of these in one process. They are listed so the sequence can be followed and, if you would rather see requests than assertions, re-run against the worker's own dev server.
Start it with:
DATABASE_URL=postgres://postgres:[email protected]:55432/postgres JWT_SECRET=poc-secret ./node_modules/.bin/wrangler dev --port 8787
Replace https://api.test with http://127.0.0.1:8787 in each URL below. The steps are ordered the way this write-up narrates them, one-click chain first; the proof of concept runs the two-row scenario before the one-click scenario, and the addresses below are the ones it actually allocates.
{% stepper %} {% step %}
As the attacker
POST /auth/nonce then POST /auth/login, signing with a wallet generated on the spot. The nonce comes back from the first call and a bearer token from the second; the same two calls give the victim a session.
curl -s -X POST http://127.0.0.1:8787/auth/nonce
{% endstep %}
{% step %}
As the victim (control)
POST /notifications/channels/email for [email protected] and confirm it, so the guard has something to fire against.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $VICTIM" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the attacker (negative control)
POST /notifications/channels/email for the address the victim just verified.
Expected: 400 {"error":"This email address is already linked to another account"} and one row in user_channels. If this returns 200, stop, because the run would measure nothing.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $ATTACKER" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the attacker
POST /notifications/channels/email for an address nobody holds.
Expected: 200. The two arms differ, so the 400 in the previous step is a statement about that address and not about the endpoint.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $ATTACKER" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the attacker
POST /notifications/channels/email for [email protected], an address belonging to somebody else.
Expected: 200, and a pending row owned by the attacker.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $ATTACKER" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
ENS sends the confirmation mail
ENS, not the attacker, posts the confirmation mail to https://api.sendgrid.com/v3/mail/send. In the proof of concept that request is intercepted in process and its body is kept, so the message can be read the way its recipient would read it:
personalizations[0].to[0].emailis[email protected].- The subject is
Verify your email address - ENS Notifications. - The
text/plainpart carrieshttps://app.ens.dev/notifications/channels/email/verify?token=<32 hex characters>. - The
text/htmlpart puts the same URL behind its button.
Against the dev server, read the same line out of the worker's log (services/email/verification.ts:90-93 logs verificationUrl), or out of the mail itself if a real SendGrid key is configured.
{% endstep %}
{% step %}
As the owner of [email protected]
POST /notifications/channels/email/verify with the token taken out of that link. This is the one click, and it is the only interaction the address owner makes.
Expected: 200, and the attacker's row is now verified.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email/verify -H 'Content-Type: application/json' -d '{"token":"<the token in the link ENS mailed to [email protected]>"}'
{% endstep %}
{% step %}
As the owner of [email protected]
POST /notifications/channels/email to link your own address to your own account.
Expected: 400 {"error":"This email address is already linked to another account"}. This is the end of the one-click chain; the steps below use a different address to reach the two-row state.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $OWNER3" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the attacker
POST /notifications/channels/email for [email protected] and leave the row pending.
Expected: 200.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $ATTACKER" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the owner of [email protected]
POST /notifications/channels/email for your own address.
Expected: 200, because the guard filters on status = 'verified' and does not see the attacker's pending row, so user_channels now holds two rows for one address.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email -H "Authorization: Bearer $OWNER2" -H 'Content-Type: application/json' -d '{"email":"[email protected]"}'
{% endstep %}
{% step %}
As the owner of [email protected]
POST /notifications/channels/email/verify twice, once for your own confirmation mail and once for the attacker's, both of which arrived in your mailbox from ENS with the same subject and the same body.
Expected: 200 both times, and two verified rows with two different user_ids on one target.
curl -s -X POST http://127.0.0.1:8787/notifications/channels/email/verify -H 'Content-Type: application/json' -d '{"token":"<the token in the second mail>"}'
{% endstep %}
{% step %}
As the owner of [email protected]
GET /notifications/channels, then DELETE /notifications/channels/<the attacker's row id>.
Expected: the list contains one channel, which is yours, and the delete returns 404.
curl -s http://127.0.0.1:8787/notifications/channels -H "Authorization: Bearer $OWNER2"
{% endstep %}
{% step %}
As SendGrid
POST /webhook/sendgrid/events with a correctly signed spamreport for [email protected].
Expected: 200, and the address owner's row is the one set to bounced. The proof of concept generates its own ECDSA P-256 key pair, sets it as SENDGRID_WEBHOOK_VERIFICATION_KEY, and signs timestamp + body the way SendGrid does; the same request unsigned returns 401, which is asserted first.
{% endstep %}
{% step %}
As the owner of [email protected]
Have an expiry notification created for one of your own names, then GET /notifications.
Expected: the notifications row is created and the feed returns it, and notification_deliveries gains zero email rows, where before the event it gained one.
curl -s http://127.0.0.1:8787/notifications -H "Authorization: Bearer $OWNER2"
{% endstep %} {% endstepper %}
Observed output
PASS the attacker session is issued by the shipped SIWE routes to a wallet generated in this file :: POST /auth/nonce -> 200, POST /auth/login -> 200
PASS negative control: against a verified row the cross-user guard refuses the attacker and writes nothing :: POST /notifications/channels/email -> 400 "This email address is already linked to another account", user_channels rows = 1
PASS the same endpoint answers 200 for an address no other account has verified, so the 400 above is a statement about that address :: POST /notifications/channels/email for an unheld address -> 200
PASS an account with no relationship to the address may claim it: the row is created pending and ENS mails the confirmation link to the address :: POST /notifications/channels/email -> 200, status = pending
PASS the cross-user guard filters on status = verified, so it does not see the pending row and the real owner is allowed in :: POST /notifications/channels/email as the address owner -> 200, user_channels rows = 2
PASS both confirmation mails were posted to that one mailbox and are indistinguishable to its owner: same subject, same body once the token is masked :: two POSTs to https://api.sendgrid.com/v3/mail/send, both to [email protected], subject "Verify your email address - ENS Notifications", bodies identical with the token masked
PASS POST /notifications/channels/email/verify never re-checks the claim, so the second confirmation is accepted after the address is already verified elsewhere :: first verify -> 200, second verify -> 200
PASS end state, reached entirely through the shipped routes: one address, two verified user_channels rows, two different owners :: verified rows = 2, distinct user_id = 2
PASS the address owner cannot delete the other row: DELETE /notifications/channels/:id is scoped to the caller :: DELETE /notifications/channels/<the other row> as the address owner -> 404
PASS the address owner is never shown the other row, so nothing in the product reports the state :: GET /notifications/channels as the address owner returns 1 channel
PASS having removed their own row the address owner can no longer link their own address, because the row that survives is verified :: POST /notifications/channels/email -> 400 "This email address is already linked to another account"
PASS the mail ENS composed for the other account's claim is addressed to the address owner's own mailbox and carries an ENS confirmation link :: POST https://api.sendgrid.com/v3/mail/send, personalizations[0].to[0].email = [email protected], subject = "Verify your email address - ENS Notifications", link = https://app.ens.dev/notifications/channels/email/verify?token=<32 hex characters>
PASS the confirmation is driven by the token parsed out of the mail body, not by a value read from the database :: POST /notifications/channels/email/verify carrying the token from the mailed link -> 200, and that string matches the one channel_verifications held, compared afterwards as a check
PASS the address owner interacts exactly once: one unauthenticated confirmation request carrying a token that came from the mail, and no request at all made with their session :: requests from the claim to the binding = 2: 1 POST /notifications/channels/email on the other account's bearer, 1 unauthenticated POST /notifications/channels/email/verify; victim interactions = 1, requests carrying the address owner's session = 0
PASS one click on the confirmation mail is enough: the address is bound to the other account and the address owner is refused :: user_channels rows = 1 owned by the other account, the
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 design enforces uniqueness only on (user_id, channel, target) and checks for conflicts only against verified rows, so a pending claim is invisible and the verify step never re-checks whether the address has since been claimed.
Impact
An attacker could bind a victim's unverified email address to their own account with one click by the victim, preventing the real owner from linking it and causing ENS notification mail from the attacker's account to reach the victim; the address itself is not disclosed.
What the attacker needed
A self-generated wallet for a session; victim's address not yet verified; victim clicks the genuine confirmation link
The fix
The claim and verify routes should enforce a single verified owner per address, re-checking at verify time and adding an owner predicate to the queries that locate a channel by target.
How it was found
- Attacker obtains a session by signing in with a self-generated wallet.
- Attacker posts a victim's unverified email address to the email channel endpoint, creating a pending row.
- ENS sends a genuine confirmation mail to that address.
- The recipient clicks the confirmation link once.
- The token from the mail drives an unauthenticated verify request that flips the attacker's row to verified.
- The real owner is then refused when trying to link their own address.
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.
When you add an email address to an account, the site usually sends a confirmation link to prove you own that mailbox. Here the site only checked for clashes against addresses that were already confirmed, so an unconfirmed claim by someone else was ignored. An attacker could therefore claim a stranger's address, and when the real owner clicked the genuine confirmation email, the address got attached to the attacker's account instead.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.