GHSA-PP5V-MVWG-76MP
Embedded OIDC provider: hardcoded cookie signing key allows forged provider cookies, and clientBasedCORS reflects arbitrary origins
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-PP5V-MVWG-76MP divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Embedded OIDC provider: hardcoded cookie signing key + permissive CORS
Severity: Medium
Reporter: `meifukun` (https://github.com/meifukun), private disclosure
Affected component: `src/node/security/OAuth2Provider.ts` (the embedded `oidc-provider`, active when `authenticationMethod=sso`)
Observed: Etherpad `3.3.2` @ `9a6109b`; both defects unchanged on `develop`.
Fix PR: ether/etherpad#8070
This advisory covers two independent defects in Etherpad's *embedded* OIDC provider (Etherpad acting as an Identity Provider). Distinct from the SSO *relying-party* session-fixation issue (GHSA-73h9-c5xp-gfg4) and the JWT admin-claim issue (GHSA-qfmh-fph3-mw8q).
---
Issue 1 — Hardcoded OIDC cookie signing key (CWE-321 / CWE-347)
The provider was configured with the committed literal cookie signing key:
cookies: { keys: ['oidc'] },`oidc-provider` uses `cookies.keys` as the HMAC key for its `.sig` cookies (`_interaction`, `_interaction_resume`, `_grant`, `_session`). Because the key was public in source, anyone could compute valid signatures for these provider cookies, fully bypassing their integrity boundary.
Honest scope. `oidc-provider` stores interaction/session payloads server-side, so signature-forgery alone does not mint an arbitrary `accountId`. Cross-user account compromise requires an additional condition (captured victim cookie, non-HTTPS interception, or a session-fixation flow). The reporter verified locally that a self-hosted instance accepted attacker-recomputed `.sig` cookies and completed an authorization flow with every submitted signature re-signed under the key `oidc`.
### Fix
`resolveOidcCookieKeys()` (new `OidcProviderSecurity.ts`): prefer operator-supplied `settings.sso.cookieKeys` (ordered array for rotation); otherwise derive a secret key from the persisted session secret (`SESSIONKEY.txt`) via a domain-separated SHA-256 — stable across restarts and horizontally-scaled pods, never committed to source; ephemeral random fallback when no session secret exists.
---
Issue 2 — `clientBasedCORS` returns `true` for every origin (CWE-942)
clientBasedCORS: (ctx, origin, client) => { return true }The `origin`/`client` arguments were ignored, so the token and userinfo endpoints reflected any `Origin` into `Access-Control-Allow-Origin`. Browser JavaScript from unregistered origins could read responses for requests using non-cookie credentials (Authorization headers, POST-body client credentials).
Honest scope. `Access-Control-Allow-Credentials: true` is not emitted, so cookie-based browser reads remain blocked. Practical risk applies with a leaked/weak client secret or a leaked bearer token: `/oidc/token` and `/oidc/me` responses become cross-origin readable by an attacker page. The reporter verified reflection of `https://evil.attacker.com` on both endpoints.
### Fix
`isOriginAllowedForOidcClient()`: allow a CORS origin only when it exactly matches (scheme+host+port) the origin of one of the client's registered redirect URIs. Verified against a real `oidc-provider@9.9.1` `Client` instance.
---
## Workarounds (pre-patch)
- Do not expose the embedded OIDC provider (`authenticationMethod=sso`) to untrusted networks.
- Use strong, unique OIDC client secrets (Etherpad already warns on placeholder `ADMIN_SECRET`/`USER_SECRET`).
- Terminate TLS and prevent cookie interception.
## Credits
Both issues reported privately by `meifukun` (https://github.com/meifukun).
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 |
Arsenal 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-pp5v-mvwg-76mpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
