Cloudanix VulnDB

CVE-2024-12911

High · 7.1

LlamaIndex vulnerable to Creation of Temporary File in Directory with Insecure Permissions

CVSS

7.1

EPSS

0.5%

Published

Mar 20, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in certain AI query tools lets attackers send specially crafted instructions that can create unwanted files or shut down the service.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Data Tampering
Component
Library
Class
SQL Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits prompt injection into the default_jsonalyzer function of JSONalyzeQueryEngine, resulting in unsanitized SQL execution that enables arbitrary file creation on the host and resource exhaustion for denial-of-service.

Why it matters to the business

Attackers can corrupt or exfiltrate data through file operations, interrupt AI-driven query services, and force unplanned downtime or costly recovery efforts; the issue affects widely used LLM tooling with many downstream dependents.

How an attack unfolds

An attacker supplies a crafted natural-language prompt that is processed by JSONalyzeQueryEngine; the default_jsonalyzer function fails to neutralize the input, allowing injected SQL statements to execute, create arbitrary files, or consume excessive resources.

How to fix it

Upgrade the affected package to version 0.12.3 or later; apply the equivalent commit 052e2a1a425c7b04d569399c5276a161d493a40f for combodo/itop deployments; validate that prompt-handling paths no longer pass unsanitized input to SQL engines.

How to confirm the fix worked

Review release notes and changelogs for the 0.12.3 update; run integration tests that submit known malicious prompts and confirm SQL statements are rejected or parameterized; scan dependency manifests to verify the fixed version is deployed.

Typical attack path

  1. Identify an application exposing the vulnerable JSONalyzeQueryEngine endpoint or integration.
  2. Craft a prompt containing SQL syntax that bypasses sanitization in default_jsonalyzer.
  3. Submit the prompt to trigger SQL execution.
  4. Observe successful file creation or service degradation confirming exploitation.
  5. Escalate by chaining file writes into further persistence or data access.

How to detect it

Inspect application and database logs for unexpected SQL statements containing file-system operations or unusual resource spikes; correlate prompt inputs with downstream SQL activity in LLM orchestration logs.

What your security team should do

  • Immediately upgrade all instances to the fixed version 0.12.3.
  • Implement input validation and output escaping around all LLM-to-SQL query paths as a defense-in-depth measure.
  • Monitor for unusual file creation or high resource usage originating from query-engine processes.
  • Add the vulnerability to internal scanning policies until patch deployment is confirmed across the fleet.

The record

A vulnerability in the `default_jsonalyzer` function of the `JSONalyzeQueryEngine` in the run-llama/llama_index repository allows for SQL injection via prompt injection. This can lead to arbitrary file creation and Denial-of-Service (DoS) attacks. The vulnerability affects the latest version and is fixed in version 0.12.3.

Affected packages

Ecosystem Package Introduced Fixed
PyPI llama-index 0 0.12.3

Related vulnerabilities