Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
UUID acquisition requires out-of-band leakage (AC:H); no auth needed at the redemption endpoint (PR:N); victim must initiate the transfer (UI:R); full token compromise with no availability impact (C:H/I:H/A:N).
Primary rating from Vendor (https://github.com/ether/etherpad).
CVSS VectorVendor: https://github.com/ether/etherpad
Lifecycle Timeline
2DescriptionCVE.org
Etherpad's device-to-device author-token transfer endpoint is replayable, never expires, and exposes the cleartext author token in the GET response body
Description
Etherpad ships an endpoint pair under /tokenTransfer (src/node/hooks/express/tokenTransfer.ts) that lets a logged-in user move their HttpOnly author token to a different browser (typically by scanning a QR code containing the transfer URL). The flow is:
- POST
/tokenTransfer- the source device sends a request whose own author cookie is read off the server-side cookie jar. The server mints a random UUID and stores the author token (and arbitraryprefsHttpfield) under a DB key keyed by that UUID. The UUID is returned. - GET
/tokenTransfer/{uuid}- the destination device GETs the URL containing the UUID. The server reads the stored record and sets the HttpOnly author cookie on the response.
The original implementation has three serious flaws:
- No expiration check.
createdAtis written to the record on POST but never inspected on GET. A leaked transfer URL is redeemable indefinitely. - No single-use enforcement. The DB record is not deleted after a successful GET, so the same URL can be redeemed repeatedly - each redemption yielding a fresh cookie set on whoever issued the GET.
- Author token echoed in the response body. The GET handler ends with
res.send(tokenData), which serializes the full record - including the raw author token - into the JSON response. Any JavaScript on the page that issued the GET can read the token, defeating the HttpOnly cookie design that exists specifically to keep the token out of JS reach.
Combined, these mean that any disclosure of a transfer UUID (browser history, mis-shared QR code, screenshot, server log, third-party plugin that proxies the request, an unencrypted intermediate hop) results in persistent authorship impersonation of the originating account - the attacker doesn't just get one cookie, they can re-redeem and they get the raw token in cleartext for storage / replay against other endpoints.
Severity rationale
- AV:N - exploitable over the network.
- AC:H - requires the attacker to learn the transfer UUID via some out-of-band channel; UUIDs are random.
- PR:N - no authentication required at the redemption endpoint.
- UI:R - the legitimate user must have issued the POST and the UUID must end up where the attacker can see it (QR code, screenshot, etc.).
- C:H / I:H - full author identity takeover (read + write everything that author can).
- A:N - no direct denial-of-service.
CVSS lands at 7.5 (High). Some operators may reasonably score this lower (UI:R + AC:H) if their threat model assumes the transfer URL never leaves the user's own device pair.
Affected versions
ep_etherpad-lite >= 2.6.0, <= 3.0.0. The/tokenTransferendpoint pair was added in41cb680"let user maintain a single session across multiple browsers" (#7228), first tagged in v2.6.0 (2025-11-18). All three flaws (no TTL, no single-use, token in response body) were present from the introducing commit and persisted throughv3.0.0.
Patched versions
ep_etherpad-lite >= 3.1.0- the fix is ondevelopHEAD as commit8c6104c. Update this field with the actual tagged release version when it ships.
Proof of concept
# 1. Victim posts a transfer from their device.
curl -X POST https://pad.example/tokenTransfer \
-H 'Cookie: token=t.victim-author-token' \
-H 'Content-Type: application/json' \
-d '{"prefsHttp": ""}'
# -> {"id": "1f0b2a3c-..."}
# 2. UUID leaks (browser history, intercepted QR, etc.).
# 3. Attacker redeems it from a totally different machine:
curl -i https://pad.example/tokenTransfer/1f0b2a3c-...
# Headers include:
# Set-Cookie: token=t.victim-author-token; Path=/; HttpOnly; ...
# Body contains:
# {"token":"t.victim-author-token", "prefsHttp": "", "createdAt": ...}
#
# Attacker now owns the victim's identity. They can also re-redeem the
# same UUID (no single-use), and the body gives them the cleartext token
# even if the HttpOnly cookie isn't useful to their tooling.Workarounds
- Disable any UI that surfaces the transfer URL (QR code, copy-button, etc.).
- Reverse-proxy block
/tokenTransfer/*if device-pairing is not in use. - Set short DB cleanup intervals (does not address the JS-readable body issue).
None of these workarounds are sufficient on their own - upgrade is the only complete fix.
Fix
Patched in 8c6104c (PR #7784):
- 5-minute TTL (
TRANSFER_TTL_MS). Records older than this return 410 Gone. Records with absent/non-numericcreatedAt(legacy records from older code paths) are treated as expired. - Single-use. The DB record is removed before the success response is written, so a parallel request that wins the race observes an already-redeemed transfer rather than a second usable copy.
- Body sanitised. The response body becomes
{ok: true, prefsHttp}- the raw author token is no longer included. The HttpOnly cookie set in the same response is the only delivery channel.
- const tokenData = await db.get(`${tokenTransferKey}:${id}`);
+ const key = tokenTransferKey(id);
+ const tokenData: TokenTransferRequest | undefined = await db.get(key);
if (!tokenData) {
return res.status(404).send({error: 'Token not found'});
}
+ await db.remove(key);
+ const createdAt = typeof tokenData.createdAt === 'number'
+ ? tokenData.createdAt : 0;
+ if (Date.now() - createdAt > TRANSFER_TTL_MS) {
+ return res.status(410).send({error: 'Token expired'});
+ }
...
- res.send(tokenData);
+ res.send({ok: true, prefsHttp: tokenData.prefsHttp});Resources
- Patched in: https://github.com/ether/etherpad/pull/7784 (squash commit
8c6104c). - Vulnerable code introduced in: https://github.com/ether/etherpad/commit/41cb680 (PR #7228), released in v2.6.0.
- Background on the HttpOnly author-token migration: ether/etherpad PR #7548 (PR3 of #6701, released in v2.7.3). That earlier PR addressed two adjacent issues (the cookie was previously non-HttpOnly, and the POST handler previously trusted the request body for the token value). This GHSA covers only the three flaws that remained after that earlier patch.
Credits
Reported during an internal security audit by Claude (via @JohnMcLear).
AnalysisAI
Three concurrent design flaws in Etherpad's /tokenTransfer device-pairing endpoint (ep_etherpad-lite 2.6.0-3.0.0) enable persistent authorship impersonation: transfer UUIDs never expire, can be redeemed unlimited times, and the GET handler echoes the raw author token in the JSON response body - defeating the HttpOnly cookie boundary that was introduced specifically to keep the token out of JavaScript reach. Any attacker who obtains the UUID through realistic disclosure channels (browser history, intercepted QR code, server log, third-party plugin) can assume the victim's full read/write author identity indefinitely, re-authenticate on demand, and extract the cleartext token for replay against other endpoints. A working proof-of-concept is included in the advisory; no exploitation has been confirmed by CISA KEV at time of analysis.
Technical ContextAI
The vulnerable code resides in src/node/hooks/express/tokenTransfer.ts within the ep_etherpad-lite npm package (pkg:npm/ep_etherpad-lite), introduced in commit 41cb680 (PR #7228) and first released in v2.6.0 on 2025-11-18. The feature implements QR-code-based device pairing: a POST to /tokenTransfer mints a random UUID, stores the author token and prefsHttp preferences under a UUID-keyed DB record, and returns the UUID; a subsequent GET to /tokenTransfer/{uuid} is intended to set the HttpOnly author cookie on the destination device. Three independent CWE-200 (Information Exposure) violations compound: (1) createdAt is written to the DB record on POST but the GET handler never reads it, so records are permanently valid; (2) the DB record is never removed after a successful redemption, making the endpoint a replay oracle; (3) the GET handler terminates with res.send(tokenData), serializing the entire stored record - including the raw token field - into the HTTP response body, which is readable by any in-page JavaScript and nullifies the HttpOnly boundary. The adjacent security work in PR #7548 had previously migrated the token to HttpOnly specifically to block JS access; this vulnerability's third flaw re-exposes that token through the same API response path that was intended to safely transport it.
RemediationAI
Upgrade ep_etherpad-lite to version 3.1.0 or later, which incorporates commit 8c6104c via PR #7784 (https://github.com/ether/etherpad/pull/7784). The fix applies three targeted mitigations: a 5-minute TTL (TRANSFER_TTL_MS) with 410 Gone responses for expired or legacy records; atomic single-use enforcement by deleting the DB record before writing the success response; and response body sanitization to {ok: true, prefsHttp}, eliminating the cleartext token from any API surface. Note that the advisory describes v3.1.0 as the patched release but explicitly states this field will be updated when the tagged release ships - the fix is confirmed at commit level but the npm release has not been independently verified beyond the upstream commit reference. If immediate upgrade is not feasible, blocking /tokenTransfer/* at the reverse proxy is the most complete available workaround and fully mitigates all three flaws at the cost of disabling device pairing entirely. Disabling only the UI surfaces that generate or display transfer URLs (QR widget, copy button) raises the UUID acquisition bar but leaves the endpoint reachable via direct HTTP requests and is insufficient on its own. The vendor explicitly states that upgrade is the only complete fix.
Same weakness CWE-200 – Information Exposure
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-62725
GHSA-vqfp-p66c-xrp9