Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-72540

CVE-2026-72540: PhotoPrism Auth Bypass Vulnerability

CVE-2026-72540 is an authentication bypass flaw in PhotoPrism allowing unauthorized album cover access via insecure direct object references. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-72540 Overview

CVE-2026-72540 is an Insecure Direct Object Reference (IDOR) vulnerability in PhotoPrism through commit bb0b933. The AlbumCover handler serves original-resolution album cover images without verifying that the requesting user owns or has access to the requested album. Any authenticated user holding a valid preview token can enumerate album identifiers and retrieve cover photos belonging to other users. The flaw is categorized under CWE-639: Authorization Bypass Through User-Controlled Key.

Critical Impact

Attackers with any valid preview token can download original-resolution cover images from arbitrary albums, exposing private photos across user boundaries.

Affected Products

  • PhotoPrism through commit bb0b933
  • Self-hosted PhotoPrism deployments serving multiple users
  • Instances exposing the AlbumCover handler to authenticated preview-token holders

Discovery Timeline

  • 2026-08-11 - CVE-2026-72540 published to the National Vulnerability Database
  • 2026-08-11 - Last updated in NVD database

Technical Details for CVE-2026-72540

Vulnerability Analysis

PhotoPrism is a self-hosted photo management application written in Go. The AlbumCover handler exposes an HTTP endpoint that returns the cover image for a specified album UID. The endpoint accepts a preview token as an authentication artifact but does not check whether the token holder has permission to view the targeted album.

Because album UIDs are directly referenced in the request path, an attacker can iterate through or guess album identifiers. Each request returns the original-resolution cover image, bypassing per-album access controls. The vulnerability affects confidentiality of user photos but does not modify data or affect availability.

Root Cause

The root cause is a missing authorization check in the AlbumCover handler. Authentication via the preview token is validated, but the handler treats successful token validation as sufficient authorization for any album resource. The application fails to verify that the resolved album belongs to, or is shared with, the requesting principal before returning the image bytes.

Attack Vector

An attacker requires network access to the PhotoPrism instance and a valid preview token, which any authenticated user account can obtain. The attacker enumerates album UIDs and issues GET requests to the AlbumCover endpoint for each UID. The server returns cover images regardless of ownership. Refer to the PhotoPrism GitHub repository for technical context on the affected handler.

No verified proof-of-concept code is available. The vulnerability mechanism is described in prose above; exploitation reduces to standard IDOR enumeration against the album cover endpoint.

Detection Methods for CVE-2026-72540

Indicators of Compromise

  • Sequential or high-volume requests to the AlbumCover endpoint from a single session or preview token
  • Access logs showing a single user session retrieving cover images across many distinct album UIDs
  • Preview tokens issued to low-privilege accounts generating outbound image transfers disproportionate to normal usage

Detection Strategies

  • Correlate album UID access patterns with album ownership records to identify cross-tenant retrievals
  • Alert on any user session requesting cover images for albums not associated with that user's account
  • Baseline normal preview-token request volume and flag sessions exceeding the baseline by a significant margin

Monitoring Recommendations

  • Enable verbose HTTP access logging on the PhotoPrism reverse proxy and forward logs to a centralized SIEM
  • Monitor for HTTP 200 responses on /api/v1/albums/*/t/*/cover paths issued to non-owner sessions
  • Track preview-token issuance and revocation events to correlate suspicious activity with account provenance

How to Mitigate CVE-2026-72540

Immediate Actions Required

  • Restrict PhotoPrism access to trusted users only until a patched build is deployed
  • Revoke and rotate existing preview tokens for accounts that do not require multi-user album sharing
  • Audit access logs for enumeration patterns against the AlbumCover endpoint

Patch Information

No fixed version is listed in the NVD entry at publication time. Monitor the PhotoPrism GitHub repository for commits addressing the AlbumCover handler authorization check and upgrade once a patched release is published.

Workarounds

  • Disable multi-user mode where feasible so preview tokens are scoped to a single owner
  • Place PhotoPrism behind a reverse proxy that enforces per-user ACLs on album cover paths
  • Remove or restrict the preview-token feature for untrusted accounts through configuration hardening
bash
# Example reverse-proxy restriction (nginx) limiting cover access to authenticated internal users
location ~ ^/api/v1/albums/.+/t/.+/cover$ {
    allow 10.0.0.0/8;
    deny all;
    proxy_pass http://photoprism_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.