CVE-2024-5753 Local File Read (LFI) by Prompt Injection via Postgres SQL in vanna-ai/vanna

High 7.5 Published Updated

Unauthenticated attackers can read arbitrary local files on the server via SQL injection in the vanna-ai/vanna library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-5753?

CVE-2024-5753 is a high-severity SQL injection vulnerability in vanna-ai/vanna, published on 5 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

vanna-ai/vanna version v0.3.4 is vulnerable to SQL injection in some file-critical functions such as `pg_read_file()`. This vulnerability allows unauthenticated remote users to read arbitrary local files on the victim server, including sensitive files like `/etc/passwd`, by exploiting the exposed SQL queries via a Python Flask API.

Weakness: CWE-89

Which versions are affected by CVE-2024-5753?

3 open source packages ship an affected version, including vanna.

PackageAffectedFixed in
vanna PyPIAll versions to 0.3.4None
vanna PyPIAll versions to 0.3.4None
vanna PyPIAll versions to 0.3.4None

How do I fix CVE-2024-5753?

No fix has been published for CVE-2024-5753 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2024-5753 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5753 exists.

Sources

Also known as GHSA-mwxm-35f8-6vg2, PYSEC-2026-2002.

Is CVE-2024-5753 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free