What’s Vulnerable › Vulnerabilities
CVE-2023-52082: Lychee is vulnerable to an SQL Injection in explain DB queries.
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-12-28 · updated 2026-06-17
- Weakness: CWE-89
Description
Lychee is a free photo-management tool. Prior to 5.0.2, Lychee is vulnerable to an SQL injection on any binding when using mysql/mariadb. This injection is only active for users with the `.env` settings set to DB_LOG_SQL=true and DB_LOG_SQL_EXPLAIN=true. The defaults settings of Lychee are safe. The patch is provided on version 5.0.2. To work around this issue, disable SQL EXPLAIN logging.
Affected products
- LycheeOrg Lychee: from 4.9.3 before 5.0.2 — fixed in 5.0.2
How to fix
Upgrade to a fixed version: LycheeOrg Lychee 5.0.2. Check the vendor advisory for mitigations.
References
- https://github.com/LycheeOrg/Lychee/commit/33354a2ce7cf700cc4ee537b7b8b94dfc1e84ad4
- https://github.com/LycheeOrg/Lychee/security/advisories/GHSA-rjwv-5j3m-p5x4
- https://github.com/LycheeOrg/Lychee/commit/33354a2ce7cf700cc4ee537b7b8b94dfc1e84ad4
- https://github.com/LycheeOrg/Lychee/security/advisories/GHSA-rjwv-5j3m-p5x4
Get alerted when CVE-2023-52082 or the next vulnerability affects your stack