Summary
An insecure direct object reference (IDOR) in OpenProject's project storage settings allows a project admin to rebind their project to another project's managed Nextcloud or OneDrive folder.
By tampering with the project_folder_id in a PATCH request, an attacker can cause subsequent folder syncs to overwrite ACLs and gain unauthorized access to resources in other projects sharing the same storage.
Affected context
This vulnerability occurs in OpenProject instances that use managed external storage integrations such as Nextcloud or OneDrive and expose the /projects/<id>/settings/project_storages/<ps_id> endpoint to project administrators.
It relies on configurations where multiple projects are bound to the same external storage system and where the project_folder_id field controls which remote folder is managed for a given project.
The risk is highest in multi-tenant or multi-project environments where project admins are expected to be isolated from each other's files and ACL configuration.
Exploit preconditions
- Attack surface: HTTP PATCH requests to
/projects/<A>/settings/project_storages/<A_ps_id> - Required access: Project-admin privileges in at least one project on the affected OpenProject instance
- Trigger point: Manipulation of the
storages_project_storage[project_folder_id]parameter to reference another project's folder ID on the same storage backend - Why exploitation is possible: The backend logic authorizes based on the attacker's project-admin role but does not verify that the supplied
project_folder_idactually belongs to the project being administered, leading to an IDOR condition.
Why this happens
The core issue is an authorization check that focuses on the high-level project context but fails to enforce object-level ownership for the project_folder_id being updated.
This aligns with CWE-639: Insecure Direct Object Reference, where an application exposes internal identifiers and trusts client-supplied IDs without verifying that a user is entitled to operate on the referenced resource.
Abstractly, the pattern is: a privileged user can modify a relational link field (here, a foreign key to a storage folder) and thereby bind their project to resources they do not own, because the server does not validate the relationship between the project and the storage folder before applying the change.
Potential impact
- A project-admin may hijack another project's managed Nextcloud or OneDrive folder.
- ACLs on the victim folder could be overwritten with the attacker project's user list.
- Project members of the attacker's project can gain unintended read/write access to files belonging to other projects.
- Integrity of shared documents and collaboration artifacts can be compromised across projects.
- Access boundaries between projects may be eroded, impacting confidentiality and compliance controls.
General mitigation guidance
Effective mitigation focuses on enforcing object-level authorization and tightening how identifiers are handled in storage configuration flows.
Common defensive patterns include:
- Validating that any
project_folder_idbeing modified is owned by, or explicitly associated with, the current project before accepting changes. - Avoiding direct exposure of raw internal identifiers and instead using opaque references that are scoped to the project context.
- Treating relationship fields (such as foreign keys to external storage folders) as sensitive and protecting them with server-side checks rather than trusting client input.
- Applying least-privilege concepts to project-admin roles so they can manage only storage resources within their project's defined boundaries.
- Designing synchronization processes so they do not blindly rewrite ACLs based solely on mutable configuration fields without additional consistency checks.
How teams detect issues like this
Organizations can detect and prevent similar IDOR issues through a combination of design review and technical controls:
- Static analysis or linting rules that flag controller actions where user-supplied IDs are used directly in queries without scoping to the current user or project.
- Code review practices that require explicit ownership checks for relationship updates, especially in endpoints that manage external integrations or access control lists.
- Centralized authorization policies that force object-level permission checks and make it difficult to bypass them in individual endpoints.
- Logging and monitoring of configuration changes to storage bindings, with alerts on unusual cross-project folder reassignments.
- Use of automated security testing tools and dynamic scanners configured to probe for IDOR patterns by modifying identifiers in authenticated requests.

