Summary
A flaw in the GRPC authorization middleware of the Reva component in OpenCloud allows public-link scope checks to be bypassed.
When exploited via the archiver service, a malicious user can generate archives (ZIP or TAR) containing all resources accessible to the creator of the public link, not just those intended for sharing.
Affected context
This vulnerability affects deployments of the REVA interoperability platform where:
- The Reva component exposes GRPC endpoints for public links
- The archiver service can be invoked based on public-link context
- Authorization decisions rely on middleware to enforce link scope
In such environments, improper scope verification in the GRPC middleware can cause operations triggered via a public link to run with broader privileges tied to the link creator's account.
Exploit preconditions
- Attack surface: GRPC/HTTP endpoints in the Reva/OpenCloud deployment, particularly those invoking the archiver service.
- Required access: Ability to interact with a public link (or otherwise reach the affected public-link endpoints). The attacker does not need direct access to the creator's account.
- Trigger point: A crafted or malicious use of a public link that invokes the archiver service to build an archive of resources.
- Why exploitation is possible: The GRPC authorization middleware does not correctly validate the scope tied to the public link and instead allows operations to execute using the broader access of the link creator, breaking the intended access-control boundary.
Why this happens
The core issue is an authorization logic error in the GRPC middleware responsible for enforcing public-link scopes.
Instead of strictly constraining actions to the specific resources and permissions granted by a public link, the middleware allows the archiver service to operate with the full set of resources accessible to the link creator.
This aligns with CWE-863: Incorrect Authorization, where a component fails to properly enforce an authorization check for a functionality that should be restricted, allowing privilege escalation and unintended data exposure.
Conceptually, the trust boundary between "public link scope" and "full user scope" is not respected, enabling operations to implicitly inherit higher privileges.
Potential impact
- Unauthorized access to files and folders that were never intended to be shared via the public link
- Creation and download of archives containing all resources accessible to the link creator
- Exposure of sensitive business or personal data stored under the creator's account
- Potential lateral exposure of other users' documents if they are accessible to the link creator
- Increased risk of data exfiltration and privacy violations
General mitigation guidance
Effective mitigation generally focuses on tightening authorization boundaries and enforcing least privilege:
- Ensure that all operations invoked through public links (including archiving, listing, and downloading) are constrained strictly to the link's defined scope and permissions.
- Centralize authorization logic so that GRPC services consistently consult a single, well-tested policy layer instead of duplicating or bypassing checks.
- Implement clear privilege separation between "public link context" and "user account context," avoiding implicit escalation from one to the other.
- Apply defense-in-depth by validating access at multiple layers (middleware, service layer, storage layer), so that a single logic bug does not grant broad access.
- Prefer deny-by-default policies: when scope or identity is ambiguous, block the operation rather than attempting to infer permissions.
How teams detect issues like this
Organizations can detect and monitor similar issues using a mix of preventive and detective controls:
- Static analysis and code review:
- Look for GRPC handlers or middleware that map public-link requests directly to user-scoped operations without explicit scope checks.
- Flag code paths where a public link is converted into a user session or token without narrowing permissions.
- Review archiver or bulk-export features to confirm they derive their resource list from scoped identifiers rather than user-wide queries.
- Policy enforcement and testing:
- Define automated tests that verify public-link operations cannot access resources outside the explicit link target.
- Use security regression tests for any feature that aggregates or archives data based on user or link identifiers.
- Runtime and logging analysis:
- Log the principal (user vs. public link), requested resources, and resulting resource sets for archive operations.
- Alert when archives generated via public-link endpoints contain resources outside the link's configured scope.
- Automated code review or SAST tools can help highlight authorization flows that bypass standard policy checks or rely on ad hoc access control logic.

