Summary
An authorization flaw in Etherpad's OAuth2 request handling lets a non-admin user with a valid signed token invoke administrative API functions. Under the affected authorization path, this may expose, modify, copy, move, or delete pads across the instance.
Affected context
The issue affects Etherpad deployments using the requiredClaims check in the authorization_code OAuth path for /api/2/* requests. The vulnerable behavior occurs when configured non-admin users receive signed tokens carrying an admin: false claim, while authorization verifies only that the admin claim exists rather than requiring it to be true.
Exploit preconditions
- Attack surface: The Etherpad
/api/2/*administrative API endpoints - Required access: A valid signed OAuth2 token issued to a configured
non-admin user
- Trigger point: An API request processed through the
authorization_code
OAuth authorization path
- Why exploitation is possible: Authorization checks claim presence instead
of validating the claim's required Boolean value, allowing a token with
admin: false to satisfy the administrative requirement
Why this happens
The underlying bug is an incorrect authorization condition. Etherpad's authorization logic treats the existence of an admin claim as sufficient evidence of administrative privilege, even when the claim explicitly has a false value. This maps to CWE-863 because a user is permitted to perform privileged operations without satisfying the intended authorization requirement.
Potential impact
- An attacker may read or disclose pad-related information across the instance.
- An attacker could modify or append content to pads.
- An attacker could delete, copy, move, or restore pads and revisions.
- An attacker may anonymize authors or enumerate pads and pad authors.
- Collaborative content integrity and availability could be compromised.
General mitigation guidance
Mitigation generally focuses on enforcing value-aware authorization decisions at every privileged API boundary. Security controls should require the admin claim to have the expected truth value, use explicit role or permission checks, and deny access by default when claims are missing, malformed, or contradictory. Token issuance and validation should minimize trust in client-controlled claims, and administrative operations should run with narrowly scoped privileges and independent server-side policy checks.
How teams detect issues like this
Detection can include static analysis and code review for authorization conditions that test claim presence without validating claim values, especially checks using generic membership or existence operations. Reviewers can trace token issuance, claim typing, and authorization decisions across all administrative endpoints. Runtime monitoring can flag non-admin identities invoking administrative API methods, while policy enforcement can require centralized, value-aware authorization helpers and regression tests for false, missing, and malformed privilege claims. Automated code review tools may help identify these patterns.

