Use of Hard-coded Cryptographic Key in Etherpad - #VU159507
Published: November 5, 2026 / Updated: November 6, 2026
Vulnerability details
The vulnerability allows forgery of embedded OIDC provider cookie signatures and cross-origin reading of token and user information responses in Etherpad. Cookie forgery bypasses the provider cookies' integrity boundary, but cross-user account compromise additionally requires a captured victim cookie, non-HTTPS interception, or a session-fixation flow. Independently, an attacker-controlled page can read responses using non-cookie credentials when a client secret is leaked or weak, or a bearer token is leaked.
The vulnerability exists due to two independent defects: the provider uses the publicly committed literal oidc as its HMAC cookie signing key through cookies.keys, and clientBasedCORS always returns true while ignoring the origin and client arguments. A remote attacker can compute valid signatures for provider cookies using the public key and submit re-signed cookies to the provider. A remote attacker can also use JavaScript on an unregistered origin to read responses from /oidc/token and /oidc/me using a leaked or weak client secret or a leaked bearer token, because these endpoints reflect arbitrary request origins in Access-Control-Allow-Origin.
The affected component is src/node/security/OAuth2Provider.ts, which embeds oidc-provider when authenticationMethod=sso and Etherpad acts as an identity provider. The signing key protects the .sig cookies associated with _interaction, _interaction_resume, _grant, and _session. Interaction and session payloads are stored server-side, so signature forgery alone cannot create an arbitrary account identity. Local testing confirmed acceptance of recomputed signatures and completion of an authorization flow. Arbitrary-origin reflection was verified on both endpoints, but Access-Control-Allow-Credentials: true is not emitted, so cookie-based cross-origin browser reads remain blocked; the exposed responses require non-cookie credentials such as Authorization headers or POST-body client credentials.