Summary
Photoview's shareAlbum GraphQL mutation does not adequately verify that the requesting user owns the targeted album. An authenticated user may generate working share links for other users' albums, potentially exposing photos and sub-albums to anyone who obtains a link.
Affected context
The issue occurs in Photoview deployments using the shareAlbum GraphQL mutation when authorization is based on a user-supplied album identifier without confirming ownership or an equivalent sharing permission. The risk applies where authenticated users can invoke the mutation and the resulting tokens provide access to album content or token-management controls.
Exploit preconditions
- Attack surface: The authenticated GraphQL API and its shareAlbum mutation - Required access: A valid Photoview user account capable of invoking the mutation - Trigger point: Supplying an album identifier when requesting a share link - Why exploitation is possible: The server may create a valid share token
without enforcing that the requesting user owns or is authorized to share
the referenced album
Why this happens
The underlying defect is an object-level authorization failure mapped to CWE-639, Authorization Bypass Through User-Controlled Key. The mutation accepts a client-controlled album identifier but does not consistently bind the requested object to the authenticated user's ownership or permitted access scope before performing the sharing operation. This allows a valid account to act on resources belonging to another account.
Potential impact
- An attacker may create share links for albums they do not own.
- Photos and sub-albums may be exposed to anyone who receives a generated link.
- Victim content could be accessed without the owner's approval.
- Attackers may retain control over share-token settings or sharing state.
- The vulnerability could increase privacy, compliance, and reputational risk.
General mitigation guidance
Mitigation generally centers on enforcing server-side, object-level authorization for every sharing operation. The service should derive the effective user identity from the authenticated session, verify ownership or an explicitly granted sharing capability before acting on an album, and avoid trusting client-supplied identifiers as evidence of permission. Secure-by-default designs can use deny-by-default authorization, narrowly scoped share tokens, bounded token lifetimes, and separate permissions for creating, viewing, and managing links. Access to GraphQL mutations should follow least-privilege principles, and existing shares should be reviewed or invalidated when authorization state changes.
How teams detect issues like this
Detection approaches include static and semantic analysis for mutations that use client-controlled object identifiers without a nearby authorization check. Code review should examine ownership validation, authorization middleware coverage, resolver-level access decisions, and whether all nested resources are checked consistently. Dynamic testing can exercise authenticated users against albums owned by other accounts and verify that both successful creation and subsequent token-management operations are denied. GraphQL policy enforcement, audit logging for share-link creation, and automated security review tools can help identify anomalous or cross-tenant access patterns.

