---
id: "CVE-2024-12909"
page: "https://infrastack.ai/live/CVE-2024-12909"
kind: "vulnerability"
aliases: ["CVE-2024-12909", "GHSA-x48g-hm9c-ww42"]
title: "llama-index-packs-finchat SQL Injection vulnerability"
severity: "critical"
cvss: 10.0
epss: 0.01444
exploited: false
status: "open"
category: "package"
products: [{"name": "llama-index-packs-finchat", "fixed": [], "affected": "<= 0.3.0", "ecosystem": "pypi"}, {"name": "llamaindex", "fixed": ["0.3.0"], "affected": "< 0.3.0", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "cwe-89", "llama-index", "package", "postgresql", "python"]
not_affected_if: ["no-database-agent", "not-using-finchat-pack", "package-not-installed"]
published_at: "2025-03-20T10:15:31+00:00"
first_seen_at: "2026-11-16T15:17:21+00:00"
updated_at: "2026-11-16T15:37:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-x48g-hm9c-ww42", "first_seen_at": "2026-11-16T15:17:21+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12909", "first_seen_at": "2026-11-16T15:37:59+00:00"}]
exploit_sources: [{"type": "poc", "url": "https://huntr.com/bounties/44e8177f-200a-4ba3-a12c-8bc21e313a3f"}, {"type": "epss", "score": 0.01444, "url": "https://api.first.org/data/v1/epss?cve=CVE-2024-12909"}]
---

# llama-index-packs-finchat SQL Injection vulnerability

Link for people: https://infrastack.ai/live/CVE-2024-12909 (this .md is for agents)

The FinanceChatLlamaPack in the llama-index-packs-finchat PyPI package builds SQL in its database_agent run_sql_query function without sanitizing input, so an attacker can inject arbitrary SQL. Per the advisory, this can be chained through PostgreSQL large object functions to achieve remote code execution.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:llama-index-packs-finchat affected <= 0.3.0 fixed no fixed version listed
- vendor:llamaindex affected < 0.3.0 fixed 0.3.0

## How to check

- Check whether `llama-index-packs-finchat` is installed: `pip show llama-index-packs-finchat`
- Look for the package in requirements files, lock files or pyproject.toml
- Confirm the installed version is `0.3.0` or lower to be affected

## Timeline

- 2026-11-16T15:17:21+00:00 ghsa https://github.com/advisories/GHSA-x48g-hm9c-ww42
- 2026-11-16T15:37:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-12909

## Documents

- [fix] Patch: github.com https://github.com/run-llama/llama_index/commit/5d03c175476452db9b8abcdb7d5767dd7b310a75
- [poc] Exploit: huntr.com https://huntr.com/bounties/44e8177f-200a-4ba3-a12c-8bc21e313a3f

## From the sources

A vulnerability in the FinanceChatLlamaPack of the llama-index-packs-finchat package, versions up to v0.3.0, allows for SQL injection in the `run_sql_query` function of the `database_agent`. This vulnerability can be exploited by an attacker to inject arbitrary SQL queries, leading to remote code execution (RCE) through the use of PostgreSQL's large object functionality.

The issue is resolved by no longer officially supporting the package and moving it into the `stale_packages` branch on the repo, this removing it from documentation etc.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
