CVE-2024-41950
Python vulnerability analysis and mitigation

Overview

Haystack, an end-to-end LLM framework for building applications powered by LLMs, Transformer models, and vector search, was found to contain a remote code execution vulnerability in versions prior to 2.3.1. The vulnerability affects Haystack clients that allow users to create and run Pipelines from scratch. Certain Components in Haystack use Jinja2 templates, which if rendered on the client machine could allow arbitrary code execution (GitHub Advisory).

Technical details

The vulnerability stems from insecure implementation of Jinja2 templates in multiple Haystack components. The affected components include PromptBuilder, ChatPromptBuilder, DynamicPromptBuilder, DynamicChatPromptBuilder, OutputAdapter, ConditionalRouter, and the PipelineTemplate class. The issue has been assigned CVE-2024-41950 with a CVSS v3.1 base score of 7.5 (High) and vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If exploited, this vulnerability allows attackers to execute arbitrary code on systems where Haystack is deployed with user-controlled templates. This could lead to complete system compromise, as the code would run with the same privileges as the Haystack application (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Haystack version 2.3.1. Users are strongly advised to upgrade to this version or later. For those unable to upgrade immediately, a workaround is to prevent users from running the affected Components or restrict users to using only preselected templates (GitHub Advisory, Haystack Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management