/

CVE-2026-96271

Severity:

HIGH RISK

(7.1)

Authorization Bypass (CWE-639) in Photoview shareAlbum

CVE-2026-96271

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Unauthorized Data Exposure

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/photoview/photoview
github.comgithub.com/photoview/photoview/blob/81affea602401c2f0207d955919ddcc0670a9222/api/graphql/models/actions/share_token_actions.go#L64-L82
github.comgithub.com/photoview/photoview/commit/20541762fe6d9e0ce363c3d4c55556e4ccdc57a2
github.comgithub.com/photoview/photoview/issues/1494
vulncheck.comvulncheck.com/advisories/photoview-through-2.4.0-authorization-bypass-via-sharealbum

Frequently asked

questions

The described attack requires an authenticated Photoview account that can

invoke the shareAlbum mutation. Once a link is created, however, the

exposed album content may be accessible to anyone who obtains the link,

depending on the application's sharing behavior.

The attacker must provide a valid target album identifier. If identifiers

can be discovered, guessed, or obtained through other application behavior,

the authorization weakness may allow access to albums owned by other users.

Enforce server-side ownership or explicit sharing authorization before

creating or modifying a share link. Do not treat a client-supplied album ID

as proof that the requester may share that album.

Apply object-level authorization consistently in every resolver and API

operation, test cross-user access cases, use deny-by-default policies, and

monitor share-link creation for unusual cross-account activity.

Find out what's already
exploitable in your codebase.