What’s Vulnerable › Vulnerabilities
CVE-2024-41950: Insecure Jinja2 templates rendered in Haystack Components can lead to RCE
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-07-31 · updated 2026-06-17
- Weakness: CWE-1336
Description
Haystack is an end-to-end LLM framework that allows you to build applications powered by LLMs, Transformer models, vector search and more. Haystack clients that let their users create and run Pipelines from scratch are vulnerable to remote code executions. Certain Components in Haystack use Jinja2 templates, if anyone can create and render that template on the client machine they run any code. The vulnerability has been fixed with Haystack `2.3.1`.
Affected products
- deepset-ai/haystack: before 2.3.1 — fixed in 2.3.1
How to fix
Upgrade to a fixed version: deepset-ai/haystack 2.3.1. Check the vendor advisory for mitigations.
References
- https://github.com/deepset-ai/haystack/commit/3fed1366c448b02189851bf08166c1f6477a02b0
- https://github.com/deepset-ai/haystack/commit/6c25a5c73e83aa32c3241ba84a5cbb3ac0e8a89e
- https://github.com/deepset-ai/haystack/pull/8095
- https://github.com/deepset-ai/haystack/pull/8096
- https://github.com/deepset-ai/haystack/releases/tag/v2.3.1
- https://github.com/deepset-ai/haystack/security/advisories/GHSA-hx9v-6r9f-w677
Get alerted when CVE-2024-41950 or the next vulnerability affects your stack