llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · ep_etherpad-lite

GHSA-G5WR-53VX-XG75

Cross-Site WebSocket Hijacking (CSWSH) in Etherpad Admin Settings Allows Unauthorized Settings Disclosure and Modification

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición2 hDesde la divulgación, 20 nov 2026, 3:51 a. m.
Detección16 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
03:51 a. m.
04:07 a. m.
05:32 a. m.
03:51 a. m.
04:16 a. m.
04:42 a. m.
05:07 a. m.
05:32 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-G5WR-53VX-XG75 divulgada · CVSS 7.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Etherpad's administrative settings WebSocket namespace does not validate the origin of incoming WebSocket connections. An attacker who controls a sibling subdomain within the same site can cause an authenticated administrator's browser to establish a WebSocket connection to Etherpad. Because `SameSite=Lax` cookies are still sent in this same-site, cross-origin scenario, the connection can inherit the administrator's authenticated session.

The attacker can then read the server's settings and submit modified settings for persistence. A browser-based proof of concept successfully demonstrated both settings disclosure and modification.

Provisional severity: High, assuming the attacker can control or compromise a sibling subdomain and an administrator visits attacker-controlled content.

Details

The vulnerability exists in Etherpad's administrative settings WebSocket implementation.

The Socket.IO server is configured in:

  • `src/node/hooks/express/socketio.ts`

The `/settings` namespace uses session middleware but does not enforce an exact Origin allowlist during the WebSocket handshake.

The administrative settings handlers are implemented in:

  • `src/node/hooks/express/adminsettings.ts`

The connection handler checks whether the associated session belongs to an administrator:

`socket.conn.request.session.user.is_admin`

However, it does not verify that the WebSocket connection originated from an explicitly trusted origin.

After connecting, the client can emit the `load` event. The server reads the settings file and returns its contents through `settings.results`.

The client can also emit `saveSettings` with modified settings content. The server writes the supplied content to the configured settings file and acknowledges the operation through `saveprogress`.

The relevant security issue is that authentication is based on the administrator's session, while the WebSocket connection's origin is not independently validated.

Etherpad's session cookie configuration is handled in:

  • `src/node/hooks/express.ts`

The SameSite cookie setting does not prevent this attack when the attacker-controlled origin is a sibling subdomain of the Etherpad host. SameSite is based on the site boundary, whereas the browser origins remain different.

For example:

  • Target: `https://pad.example.com`
  • Attacker-controlled sibling: `https://evil.example.com`

These are different origins but generally considered same-site. Consequently, a `SameSite=Lax` session cookie does not provide protection against this particular attack.

Proof of concept
Preconditions
  1. Etherpad is running with the administrative settings WebSocket functionality enabled.
  2. The victim is authenticated as an administrator.
  3. The attacker can host JavaScript on a sibling subdomain belonging to the same site as Etherpad.
  4. The victim visits the attacker-controlled page while authenticated to Etherpad.
Reproduction

A browser-based integration test was added to the research fork:

`src/tests/backend/specs/admin/adminSettingsCswsHBrowser.ts`

Test source:

https://github.com/brx-zyy/etherpad/blob/security-repro-import-temp-leak/src/tests/backend/specs/admin/adminSettingsCswsHBrowser.ts

The test workflow:

https://github.com/brx-zyy/etherpad/blob/security-repro-import-temp-leak/.github/workflows/cswsH-browser-repro.yml

Test procedure
  1. Start an isolated Etherpad instance with an administrator session.
  2. Configure the test browser to resolve `pad.etherpad.test` and `evil.etherpad.test` to the local test server.
  3. Set an authenticated administrator session cookie scoped to the target host with `SameSite=Lax`.
  4. Open the attacker-controlled page at `evil.etherpad.test`.
  5. From that page, establish a Socket.IO connection to the target's `/settings` namespace.
  6. Emit the `load` event.
  7. Observe the settings returned through `settings.results`.
  8. Emit `saveSettings` with a test settings value containing a unique marker.
  9. Observe the server's save acknowledgement.
  10. Verify that the unique marker was written to the settings file on disk.
Verified result

The automated Chromium browser integration test successfully demonstrated:

  • A cross-origin connection from a sibling subdomain to the `/settings` namespace.
  • Use of the authenticated administrator session in the WebSocket connection.
  • Disclosure of settings through the `load` event.
  • Modification of the settings file through the `saveSettings` event.
  • Successful persistence of the modified settings, verified on disk.

A separate unrelated-site control using `attacker.invalid` did not receive the settings disclosure under the tested `SameSite=Lax` configuration.

Reproduction evidence:

Successful GitHub Actions run:

https://github.com/brx-zyy/etherpad/actions/runs/44690647623

Tested code commit:

`2e7d2158cfc620772b2ce9b1298f29bd28f0375d`

Impact

An attacker able to control a same-site sibling subdomain can exploit an authenticated administrator's browser to access the privileged `/settings` WebSocket namespace.

Successful exploitation can result in:

  1. Administrative settings disclosure: Sensitive configuration values may be exposed to the attacker.
  2. Administrative settings modification: The attacker can submit modified settings and have them written to the server's settings file.
  3. Configuration integrity compromise: Unauthorized changes can affect the Etherpad instance's configuration and security posture.

The vulnerability primarily impacts Etherpad deployments where an attacker can host content on a sibling subdomain and an administrator visits that content while authenticated.

The demonstrated impact is settings disclosure and settings-file modification. This proof of concept does not establish arbitrary filesystem write, remote code execution, or exploitation from an unrelated external site under the tested `SameSite=Lax` configuration.

Suggested remediation

Validate the WebSocket handshake's `Origin` against an explicit allowlist of trusted Etherpad origins for privileged namespaces, including `/settings`.

Reject missing, malformed, `null`, and untrusted origins. Continue enforcing administrator session authentication, but do not rely on session cookies or SameSite attributes as a replacement for origin validation.

Maintainer note

  • `/pluginfw/installer` is affected too. The same handshake works on the plugin installer namespace, which installs and uninstalls plugins from npm. Plugins run in the Etherpad server process, so an attacker who can drive this namespace with an admin's session can get code running on the server, not only read and change settings.
  • `cookie.sameSite: "None"`. With this setting the session cookie is sent from any site, so a page on an unrelated site can do the same. The sibling-subdomain requirement only holds for the default `"Lax"`.
  • Fix (3.3.20, #8511). Handshakes on the admin namespaces are accepted only when the browser reports `Sec-Fetch-Site: same-origin`, when they carry a per-session token that the admin UI fetches from a same-origin endpoint, when the Origin is listed in the new `socketIo.allowedOrigins` setting, when they have no Origin header (non-browser clients), or, as a fallback, when the Origin matches the Host header or `publicURL`. The checks the admin UI relies on do not use the Host header, so deployments behind a reverse proxy that rewrites Host need no configuration change.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
ep_etherpad-lite≥ 2.3.0 < 3.3.20
1.8.14
2.3.0
3.3.20
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmep_etherpad-lite
Sin parche — — 1.8.14 no afectada
Versiones corregidas3.3.20
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/ether/etherpad/security/advisories/GHSA-g5wr-53vx-xg75

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.