{
 "public_id": "AIR-2024-0027",
 "incident_id": "2024-07-haystack-jinja2-template-rce",
 "date_disclosed": "2024-07-31",
 "date_occurred": null,
 "title": "CVE-2024-41950: RCE via insecure Jinja2 templates rendered in Haystack components",
 "class": "responsible_disclosure",
 "attack_surface": "agent_framework",
 "initial_vector": "user_supplied_pipeline_template",
 "agent_capability_abused": [
  "prompt_template_rendering",
  "pipeline_construction"
 ],
 "target_product": "Haystack (haystack-ai)",
 "target_vendor": "deepset",
 "autonomy_level": "semi_autonomous",
 "impact_realized": false,
 "impact_type": [
  "remote_code_execution"
 ],
 "blast_radius": "haystack-ai < 2.3.1 in any deployment that lets users build or render custom pipelines",
 "cve": [
  "CVE-2024-41950"
 ],
 "taxonomy": {
  "owasp_asi": [
   "ASI05"
  ],
  "mitre_atlas": [],
  "labels": [
   "ssti",
   "template_injection",
   "prompt_template",
   "cwe_1336"
  ]
 },
 "defense_present": "none - templates were rendered with an unsandboxed Jinja2 environment",
 "defense_bypassed": true,
 "fix_shipped": "haystack-ai 2.3.1 (PRs #8095 and #8096)",
 "primary_sources": [
  "https://github.com/advisories/GHSA-hx9v-6r9f-w677"
 ],
 "verified_quote": "Certain Components in Haystack use Jinja2 templates, if anyone can create and render that template on the client machine they run any code.",
 "confidence": "high",
 "notes": "GHSA-hx9v-6r9f-w677, CVSS 7.7 High, published 2024-07-31. Prompt templates are a recurring SSTI surface in LLM frameworks; a sibling advisory GHSA-gphh-9q3h-jgpp / CVE-2026-44209 covers the same class in the 'banks' prompt-template library. Note that django-haystack shares the CVE-2024-41950 identifier in the GitHub advisory listing but is an unrelated Django search package.",
 "risk_category": "security_fraud",
 "risk_secondary": [],
 "risk_subcategory": "Remote Code Execution & Sandbox Escape",
 "risk_sub_secondary": [],
 "ai_entity": "generative",
 "agency": "ai_as_target",
 "agency_debatable": false,
 "agency_reason": "conventional Jinja2 SSTI in an LLM framework",
 "vector_family": "other",
 "vector_detail": "user_supplied_pipeline_template",
 "guardrail_kind": [
  "none"
 ],
 "guardrail_outcome": "not_applicable",
 "xrefs": {
  "aiid": [],
  "atlas": [],
  "cve": [
   "CVE-2024-41950"
  ],
  "ghsa": []
 },
 "primary_asi": "ASI05",
 "agent_framework": "unknown",
 "model_provider": "unknown",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "privilege_escalation",
 "eai_domain": "access_control_and_permissions",
 "eai_secondary": [],
 "eai_reason": "subcategory: Remote Code Execution & Sandbox Escape",
 "asi_curated": [],
 "asi_scope": "in_scope",
 "asi_provenance": "rule",
 "asi_reason": "ASI05 (impact=code_exec)",
 "submitted_by": "EAI Internal"
}