GHSA-C36R-65P6-Q3M9
Incomplete fix for GHSA-6mcx-x5h6-rpw2: cross-pad race still exposes chat and revision history of unauthorized pads (chat read/write, changeset history, saved revisions)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-C36R-65P6-Q3M9 divulgada · CVSS 8.2 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The fix for the cross-pad write TOCTOU (GHSA-6mcx-x5h6-rpw2) pinned the message's authorized pad ID (`messagePadId`) and forwarded it to the changeset queue, so USER_CHANGES can no longer be redirected to another pad by a concurrent CLIENT_READY. However, the remaining COLLABROOM handlers were not converted: they still resolve the target pad from the mutable per-socket session state (`sessioninfos[socket.id].padId`) at dispatch time. A concurrent CLIENT_READY for another pad rewrites that state in place — before its own authorization completes — while the original message is awaiting `checkAccess()` and the plugin hooks. The original message, authorized against pad A, is then dispatched against pad B.
Details
Affected handlers (all in `src/node/handler/PadMessageHandler.ts`): `handleChatMessage` (line ~716), `handleGetChatMessages` (~763), `handleChangesetRequest` (~1586, full revision history ≈ full pad content), `handleSaveRevisionMessage` (~655). The only guard, `sessioninfos[socket.id] !== thisSession`, detects object replacement, not the in-place mutation the CLIENT_READY pre-processing performs (as the code's own comment at the pinning site acknowledges). `SocketIORouter` processes each socket message in an independent async task with no per-socket serialization.
Because the read-only gate also uses the pinned value from pad A, a pad for which the user holds only a read-only ID can additionally receive chat writes through this race.
## Remediation
Pass the pinned authorization context (padId, authorId, read-only flag) to all message handlers — the plugin hook context already receives exactly this pinned context — instead of letting handlers read `sessioninfos[socket.id]`; alternatively, commit CLIENT_READY session-state changes only after that pad's authorization succeeds, and/or serialize message handling per socket.
Proof of concept
1. Create a public pad A and a private group pad B (`publicStatus = false`); seed B with a distinctive chat message. An attacker holding only a normal author token (no HTTP API session for B's group) gets `{"accessStatus":"deny"}` when connecting to B directly — the front door is closed.
2. On one socket, complete the handshake for pad A.
3. Emit, back-to-back on the same socket, a `GET_CHAT_MESSAGES` request and a `CLIENT_READY` for pad B.
4. The `CHAT_MESSAGES` response contains pad B's seeded chat message. Symmetrically, a raced `CHAT_MESSAGE` is stored in pad B's chat history.
In our runs both the read and the write variant succeeded on the first attempt; the authorization and hook awaits provide a wide interleaving window.
Reproduction verified locally against unmodified code, project's own backend test harness.
Impact
Any user who can join some pad (in default configuration: anyone, no account needed) can read the full revision history and chat of pads they have no access to — including private group pads — and can inject chat messages and saved revisions into them. Pad content writes via USER_CHANGES are *not* affected (that path was correctly fixed earlier).
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmep_etherpad-lite |
Sin parche | — | — | 1.8.14 afectada |
3.3.16Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/ether/etherpad/security/advisories/GHSA-c36r-65p6-q3m9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
