{
 "public_id": "AIR-2025-0016",
 "incident_id": "2025-03-llamaindex-jsonalyze-sql-injection",
 "date_disclosed": "2025-03-20",
 "date_occurred": null,
 "title": "CVE-2024-12911: prompt injection to SQL injection to arbitrary file creation in LlamaIndex JSONalyzeQueryEngine",
 "class": "responsible_disclosure",
 "attack_surface": "agent_framework",
 "initial_vector": "prompt_injection_into_generated_sql",
 "agent_capability_abused": [
  "text_to_sql_generation",
  "local_sqlite_execution"
 ],
 "target_product": "LlamaIndex (llama-index / llama-index-core)",
 "target_vendor": "LlamaIndex (run-llama)",
 "autonomy_level": "semi_autonomous",
 "impact_realized": false,
 "impact_type": [
  "arbitrary_file_write",
  "denial_of_service"
 ],
 "blast_radius": "applications using JSONalyzeQueryEngine in llama-index < 0.12.3",
 "cve": [
  "CVE-2024-12911"
 ],
 "taxonomy": {
  "owasp_asi": [
   "ASI01",
   "ASI02"
  ],
  "mitre_atlas": [],
  "labels": [
   "prompt_injection_to_sql_injection",
   "text_to_sql",
   "insecure_temp_file",
   "cwe_379"
  ]
 },
 "defense_present": "none - LLM-generated SQL executed directly against a local sqlite instance",
 "defense_bypassed": true,
 "fix_shipped": "llama-index 0.12.3",
 "primary_sources": [
  "https://github.com/advisories/GHSA-jmgm-gx32-vp4w"
 ],
 "verified_quote": "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.",
 "confidence": "high",
 "notes": "GHSA-jmgm-gx32-vp4w, CVSS 7.1 High, CWE-379. Reported via huntr. Exploitation runs ATTACH DATABASE to create files on the filesystem. Canonical example of an LLM-generated-query surface in an agent framework.",
 "risk_category": "reliability",
 "risk_secondary": [],
 "risk_subcategory": "DoS & Sponge / Resource Exhaustion",
 "risk_sub_secondary": [],
 "ai_entity": "generative",
 "agency": "agent_acted",
 "agency_debatable": false,
 "agency_reason": "the engine generated and executed SQL that wrote files",
 "vector_family": "indirect_prompt_injection",
 "vector_detail": "prompt_injection_into_generated_sql",
 "guardrail_kind": [
  "none"
 ],
 "guardrail_outcome": "not_applicable",
 "xrefs": {
  "aiid": [],
  "atlas": [],
  "cve": [
   "CVE-2024-12911"
  ],
  "ghsa": []
 },
 "primary_asi": "ASI01",
 "agent_framework": "llamaindex",
 "model_provider": "meta",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "uncontrolled_resource_consumption",
 "eai_domain": "tool_misuse",
 "eai_secondary": [],
 "eai_reason": "subcategory: DoS & Sponge / Resource Exhaustion",
 "asi_curated": [],
 "asi_scope": "in_scope",
 "asi_provenance": "rule",
 "asi_reason": "ASI01 (vector_family=indirect_prompt_injection); ASI02 (impact=tool_misuse)",
 "submitted_by": "EAI Internal"
}