CVE-2023-52082
CWE-89Published: December 28, 2023· Updated: Jun 17, 2026
Official 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.
Risk Analysis
Lychee versions prior to 5.0.2 are vulnerable to SQL injection when specific debug logging settings are enabled. This critical flaw allows remote attackers to compromise the database. The CVSS score of 9.8 highlights the severity of the risk.
No public exploit is known, and the vulnerability is not in the CISA KEV catalog. It is remotely exploitable.
Upgrade to Lychee 5.0.2 or disable the DB_LOG_SQL and DB_LOG_SQL_EXPLAIN settings in the .env file.
Technical Analysis
CVE-2023-52082 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 9.8.
From a weakness classification perspective (CWE-89): SQL injection vulnerabilities allow attackers to manipulate database queries, potentially exposing or modifying sensitive data.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (4)
Quick Facts
Related CVEs (CWE-89)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2023-52082 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts