Cyber Posture

CVE-2024-12909

CriticalPublic PoC

Published: 20 March 2025

Published
20 March 2025
Modified
30 July 2025
KEV Added
Patch
CVSS Score 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0413 88.7th percentile
Risk Priority 22 60% EPSS · 20% KEV · 20% CVSS

Description

Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.

Security Summary

CVE-2024-12909 is a SQL injection vulnerability in the `run_sql_query` function of the `database_agent` within the FinanceChatLlamaPack of the run-llama/llama_index repository. It affects versions up to v0.12.3 and enables attackers to inject arbitrary SQL queries, which can lead to remote code execution (RCE) through PostgreSQL's large object functionality. The vulnerability is classified under CWE-89 and carries a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), marking it as critical.

The vulnerability is exploitable remotely over the network by unauthenticated attackers with low attack complexity and no requirement for user interaction. Successful exploitation allows arbitrary SQL injection, culminating in RCE on the underlying PostgreSQL database server, potentially compromising the host system with high impacts on confidentiality, integrity, and availability.

Mitigation is provided in version 0.3.0 of the affected package. The fixing commit is documented at https://github.com/run-llama/llama_index/commit/5d03c175476452db9b8abcdb7d5767dd7b310a75, with additional details available on the Huntr bounty page at https://huntr.com/bounties/44e8177f-200a-4ba3-a12c-8bc21e313a3f. Security practitioners should upgrade to the patched version and review deployments using LlamaIndex for database-integrated LLM agents.

Details

CWE(s)
CWE-89

Affected Products

llamaindex
llamaindex
≤ 0.3.0

AI Security Analysis

AI Category
AI Agent Protocols and Integrations
Risk Domain
Data-Related Vulnerabilities
OWASP Top 10 for LLMs 2025
None mapped
MITRE ATLAS Techniques
None mapped
Classification Reason
The vulnerability affects FinanceChatLlamaPack in the llama_index repository, a framework for building LLM agents and integrations, specifically in the database_agent's SQL query function, fitting AI agent protocols and integrations.

MITRE ATT&CK Enterprise Techniques

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Why these techniques?

SQL injection vulnerability in the run_sql_query function allows arbitrary SQL execution leading to RCE via PostgreSQL large objects, enabling exploitation of public-facing applications.

References