Lychee DNS Rebinding Vulnerability Bypasses SSRF Protection

Vulnerability

A server-side request forgery (SSRF) vulnerability has been identified in Lychee versions prior to 7.5.2. The issue arises in the PhotoUrlRule.php file, where the SSRF protection can be bypassed through DNS rebinding. The vulnerability exists because the IP validation only triggers when the hostname is an IP address. When a domain name is used, the validation is skipped, allowing the server to make requests to internal IPs or localhost services.

Impact

Exploitation of this vulnerability allows authenticated users to access internal HTTP services, cloud metadata endpoints, and localhost services from the Lychee server.

Reproduction

To reproduce this vulnerability, log in as an authenticated user and use a DNS service that resolves to localhost, such as '127.0.0.1.nip.io'. Then, send a POST request to '/api/v2/Photo::fromUrl' with a URL that points to an internal endpoint via the resolved hostname. The server will resolve the hostname to '127.0.0.1' and make the request to localhost, demonstrating the SSRF bypass.

Remediation

Users can update to Lychee version 7.5.2 or later, where this vulnerability has been patched.

Added: Mar 26, 2026, 10:00 PM
Updated: Mar 26, 2026, 10:00 PM

Vulnerability Rating

Custom Algorithm
spread
2.2
impact
0.6
exploitability
6.2
remediation
7.7
relevance
4.7
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.