Summary
A cross-site request forgery (CSRF) flaw in OpenProject allows an attacker to toggle the admin flag on a user account via a crafted POST request to /users/:id.
If a logged-in administrator is tricked into visiting a malicious page, their browser can silently submit this request, potentially granting admin rights to unintended users.
Affected context
The vulnerability arises in OpenProject's web-based user management interface when state-changing actions on /users/:id are accepted without robust CSRF protections.
It is most relevant in deployments where administrators manage user accounts through the standard web UI and where browsers can be induced to send authenticated requests to the application.
Exploit preconditions
- Attack surface: Web interface endpoint
/users/:idhandling user updates via POST. - Required access: Attacker must cause a logged-in administrator (or user with rights to modify
user[admin]) to visit a malicious page in a browser with an active OpenProject session. - Trigger point: Submission of a forged POST request containing the
user[admin]parameter to the vulnerable endpoint. - Why exploitation is possible: The server does not consistently validate a CSRF token or equivalent anti-forgery mechanism, allowing the browser to reuse existing authentication cookies for unintended requests.
Why this happens
This issue stems from missing or ineffective CSRF protection on a sensitive state-changing operation, mapped to CWE-352.
The user update endpoint trusts authenticated requests based solely on session cookies, without verifying that the request originated from legitimate user interaction within the application.
As a result, an attacker can embed an auto-submitting form or script in a third-party page that causes the victim's browser to send a valid POST with user[admin] set, altering user privileges.
Potential impact
- An attacker could grant administrative privileges to arbitrary user accounts.
- Existing non-admin accounts may be converted into full administrators without consent.
- Administrative control over projects, configurations, and user management can be obtained indirectly.
- Further compromise of data integrity and confidentiality may follow from misuse of elevated accounts.
General mitigation guidance
Effective mitigation focuses on enforcing strong CSRF defenses around all state-changing endpoints, especially those that alter roles or privileges.
Common patterns include requiring unique, per-request CSRF tokens tied to the user session, validating these tokens on the server, and rejecting requests that lack them.
Complementary measures involve constraining which parameters can be modified by which roles, applying least-privilege role design, and confirming high-risk actions with explicit user interaction (e.g., re-authentication or confirmation dialogs).
How teams detect issues like this
Detection often begins with reviewing server-side handlers for sensitive actions to ensure they enforce CSRF token validation and do not rely solely on cookies.
Static analysis or security linters can flag form submissions and XHR requests that omit CSRF controls or middleware, especially on endpoints that change user roles.
Security testing, such as manual penetration tests or automated web scanners, can attempt to submit cross-origin POST requests to privileged endpoints and observe whether the server accepts these forged requests.

