Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-39957

CVE-2026-39957: Lychee Auth Bypass Vulnerability

CVE-2026-39957 is an authentication bypass flaw in Lychee photo-management tool that allows authenticated users to access private album sharing data. This post covers technical details, affected versions, and mitigation steps.

Published: April 9, 2026

CVE-2026-39957 Overview

CVE-2026-39957 is an Authorization Bypass vulnerability in Lychee, a free, open-source photo-management tool. A SQL operator-precedence bug in the SharingController::listAll() method causes the orWhereNotNull('user_group_id') clause to escape the ownership filter applied by the when() block. This flaw allows any authenticated non-admin user with upload permission who owns at least one album to retrieve all user-group-based sharing permissions across the entire instance, including private albums owned by other users. The vulnerability has been fixed in version 7.5.4.

Critical Impact

Authenticated users can access sharing permissions for private albums they do not own, potentially exposing sensitive information about user groups and album access configurations across the entire Lychee instance.

Affected Products

  • Lychee versions prior to 7.5.4

Discovery Timeline

  • 2026-04-09 - CVE CVE-2026-39957 published to NVD
  • 2026-04-09 - Last updated in NVD database

Technical Details for CVE-2026-39957

Vulnerability Analysis

This vulnerability stems from improper SQL query construction within the SharingController::listAll() method in Lychee's photo management application. The core issue is a SQL operator-precedence bug (CWE-863: Incorrect Authorization) where the logical OR operation in the query escapes the intended ownership filter boundaries.

When the orWhereNotNull(APC::USER_GROUP_ID) clause is executed without proper grouping, it creates a logical condition that bypasses the ownership check entirely. The query was intended to retrieve sharing permissions only for albums owned by the authenticated user, but the improper precedence allows the OR condition to match any record with a non-null user_group_id, regardless of album ownership.

The attack requires the user to be authenticated with upload permissions and own at least one album, but these are relatively common privileges in multi-user Lychee deployments, making exploitation accessible to many legitimate users.

Root Cause

The root cause is a missing query grouping that caused SQL logical operator precedence to be evaluated incorrectly. The original code used separate whereNotNull() and orWhereNotNull() calls without wrapping them in a closure, allowing the OR condition to apply globally rather than within the ownership-filtered context. This is a common pattern mistake in ORM query builders where developers assume linear query chaining maintains logical grouping, but SQL's precedence rules cause OR clauses to escape the intended filter scope.

Attack Vector

An attacker with a standard authenticated user account (having upload permission and owning at least one album) can exploit this vulnerability through normal API interactions with the sharing controller endpoint. By requesting the list of sharing permissions, the malformed query returns all user-group-based sharing entries across the entire instance rather than just those belonging to the attacker's albums.

The following code shows the security patch that addresses this vulnerability:

php
			fn ($q) => $q->whereIn('base_album_id', BaseAlbumImpl::select('id')
				->where('owner_id', '=', Auth::id()))
		);
-		$query = $query->whereNotNull(APC::USER_ID);
-		$query = $query->orWhereNotNull(APC::USER_GROUP_ID);
+		$query = $query->where(fn ($q) => $q->whereNotNull(APC::USER_ID)
+			->orWhereNotNull(APC::USER_GROUP_ID));
		$query = $query->orderBy('base_album_id', 'asc');

		return AccessPermissionResource::collect($query->get());

Source: GitHub Commit Update

The fix wraps the whereNotNull() and orWhereNotNull() clauses within a closure passed to where(), ensuring proper SQL grouping so the OR condition is evaluated within the ownership filter context.

Detection Methods for CVE-2026-39957

Indicators of Compromise

  • Unusual API requests to sharing permission endpoints from non-admin users
  • Access logs showing bulk retrieval of sharing data by users who own few albums
  • Database query logs revealing unfiltered access to AccessPermission records

Detection Strategies

  • Monitor application logs for requests to SharingController::listAll() returning unexpectedly large result sets
  • Implement anomaly detection on API responses that return sharing permissions for albums not owned by the requesting user
  • Review audit trails for users accessing sharing information for albums outside their ownership scope

Monitoring Recommendations

  • Enable detailed logging for the sharing controller endpoints to track permission enumeration attempts
  • Configure alerts for users accessing sharing permissions that exceed their typical access patterns
  • Perform periodic audits of database queries to identify improper authorization filter bypasses

How to Mitigate CVE-2026-39957

Immediate Actions Required

  • Upgrade Lychee to version 7.5.4 or later immediately
  • Review access logs for potential exploitation of this vulnerability prior to patching
  • Audit sharing permissions to identify if any sensitive album configurations may have been exposed

Patch Information

The vulnerability is addressed in Lychee version 7.5.4. The fix is available in commit 76a3f0513eca6458bf7f8c337c1ad65e59b22bcb. Organizations should update through their standard package management workflow or by pulling the latest release from the LycheeOrg GitHub repository. Additional details are available in the GitHub Security Advisory GHSA-4v4c-g2jv-4g25 and Pull Request #4264.

Workarounds

  • Restrict upload permissions to trusted users only until the patch can be applied
  • Temporarily disable or limit access to the sharing management endpoints at the web server or firewall level
  • If feasible, temporarily restrict user registration or new account creation to minimize exposure
bash
# Configuration example
# Temporarily restrict access to sharing endpoints via nginx
# Add to your Lychee server block until patching is complete
location ~ /api/v2/sharing {
    # Allow only admin IP addresses
    allow 192.168.1.0/24;
    deny all;
}

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechLychee

  • SeverityLOW

  • CVSS Score2.3

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-863
  • Technical References
  • GitHub Commit Update

  • GitHub Pull Request #4264

  • GitHub Security Advisory GHSA-4v4c-g2jv-4g25
  • Related CVEs
  • CVE-2026-22784: Lychee Auth Bypass Vulnerability

  • CVE-2026-33738: Lychee Photo Management XSS Vulnerability

  • CVE-2026-33644: Lychee Photo Management SSRF Vulnerability

  • CVE-2026-33537: Lychee Photo Management SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English