CVE-2024-7456CWE-89

SQL Injection in lunary-ai/lunary

Critical · published November 1, 2024

CVSS v3.0
9.8
EPSS
1%
Percentile
72.5
In the wild
Unconfirmed
What it is

🚨 A sneaky SQL injection is lurking in the `/api/v1/external-users` route of lunary-ai/lunary version v1.4.2, and it’s absolutely devastating! 🔥 Think of this vulnerability like a restaurant chef blindly accepting orders with no menu verification — a rogue diner could easily request any dish, including the chef’s secret stash of recipes! 🍽️ An attacker could execute arbitrary SQL commands, leading to potentially catastrophic consequences such as complete data loss, modification, or even corruption of your precious database. Imagine waking up to find your entire menu has been rewritten by an unwanted guest!

Put simply

Think of this vulnerability like a restaurant chef blindly accepting orders with no menu verification — a rogue diner could easily request any dish, including the chef’s secret stash of recipes! 🍽️ This SQL injection arises because the `order by` clause in the SQL query uses `sql.unsafe` without any prior validation. The `orderByClause` is constructed without server-side checks, allowing attackers to manipulate the SQL execution directly.

What to do

An attacker could execute arbitrary SQL commands, leading to potentially catastrophic consequences such as complete data loss, modification, or even corruption of your precious database. Imagine waking up to find your entire menu has been rewritten by an unwanted guest! Patch to version 1.4.3 immediately to secure this endpoint. Implement server-side validation and sanitization of all user inputs, particularly in the `orderByClause`. Regularly audit your SQL queries to ensure best practices! You've got this! Follow these steps and you'll have your security locked down in no time! 🛡️

The record
Technical detail
CVSS v3.0
9.8 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01410 · 72.5th percentile
Weakness
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2024-11-01T12:05Z
EPSS history
Timeline
  • 01 NOV 12:05Z
    SQL Injection in lunary-ai/lunary
    cvelistv5