{"id":"CVE-2024-41950","aliases":["EUVD-2024-2367","GHSA-hx9v-6r9f-w677","PYSEC-2026-1447"],"status":"published","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","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`.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01171,"percentile":0.67688,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1336"],"published":"2024-07-31T15:50:59Z","modified":"2026-10-28T02:31:09Z","fixes":[{"ecosystem":"PyPI","package":"haystack-ai","fixed_in":["2.3.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"haystack-ai","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"haystack-ai","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1"}]}],"versions":["2.0.0","2.0.0a1","2.0.0a2","2.0.0a3","2.0.0b1","2.0.0b2","2.0.0b3","2.0.0b4","2.0.0b5","2.0.0b6","2.0.0b7","2.0.0b8","2.0.0rc1","2.0.1","2.0.1rc1","2.0.1rc2","2.1.0","2.1.0rc1","2.1.0rc2","2.1.1","2.1.1rc1","2.1.2","2.1.2rc1","2.2.0","2.2.0rc1","2.2.0rc2","2.2.1","2.2.1rc1","2.2.2","2.2.2rc1","2.2.3","2.2.4","2.2.4rc1","2.3.0","2.3.0rc1","2.3.0rc2","2.3.1rc1"]},{"source":"osv","ecosystem":"PyPI","package":"haystack-ai","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1"}]}],"versions":["2.0.0","2.0.0a1","2.0.0a2","2.0.0a3","2.0.0b1","2.0.0b2","2.0.0b3","2.0.0b4","2.0.0b5","2.0.0b6","2.0.0b7","2.0.0b8","2.0.0rc1","2.0.1","2.0.1rc1","2.0.1rc2","2.1.0","2.1.0rc1","2.1.0rc2","2.1.1","2.1.1rc1","2.1.2","2.1.2rc1","2.2.0","2.2.0rc1","2.2.0rc2","2.2.1","2.2.1rc1","2.2.2","2.2.2rc1","2.2.3","2.2.4","2.2.4rc1","2.3.0","2.3.0rc1","2.3.0rc2","2.3.1rc1"]}],"products":[{"vendor":"deepset","product":"haystack"},{"vendor":"deepset-ai","product":"haystack"}],"references":[{"url":"https://github.com/deepset-ai/haystack/security/advisories/GHSA-hx9v-6r9f-w677","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/deepset-ai/haystack/pull/8095","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/deepset-ai/haystack/pull/8096","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/deepset-ai/haystack/commit/3fed1366c448b02189851bf08166c1f6477a02b0","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/deepset-ai/haystack/commit/6c25a5c73e83aa32c3241ba84a5cbb3ac0e8a89e","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/deepset-ai/haystack/releases/tag/v2.3.1","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41950","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-hx9v-6r9f-w677","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41950.json","tags":["advisory"]},{"url":"https://github.com/deepset-ai/haystack","tags":["package"]},{"url":"https://pypi.org/project/haystack-ai","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-41950","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","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`.","status":"published","published":"2024-07-31T15:50:59.837Z","modified":"2024-07-31T16:20:20.326Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T14:34:04.00829Z"}],"euvd":[{"id":"EUVD-2024-2367","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`.","status":"published","published":"2024-07-31T15:50:59Z","modified":"2024-07-31T16:20:20Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T03:50:48.911719Z"}],"ghsa":[{"id":"GHSA-hx9v-6r9f-w677","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","description":"### Impact\n\nHaystack clients that let their users create and run Pipelines from scratch are vulnerable to remote code executions.\n\nCertain Components in Haystack use Jinja2 templates, if anyone can create and render that template on the client machine they run any code.\n\n### Patches\n\nThe problem has been fixed with PRs deepset-ai/haystack#8095 and deepset-ai/haystack#8096.\n\nBoth have been released with Haystack `2.3.1`.\n\n### Workarounds\n\nPrevent users from running the affected Components, or only let users use preselected templates.\n\n### References\n\nThe list of impacted Components can be found in the release notes for `2.3.1`.\nhttps://github.com/deepset-ai/haystack/releases/tag/v2.3.1","status":"published","published":"2024-07-31T18:50:41Z","modified":"2024-07-31T18:50:42Z","cvss":[{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T14:37:56.530214Z"}],"nvd":[{"id":"CVE-2024-41950","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`.","status":"published","published":"2024-07-31T16:15:04.797Z","modified":"2026-06-17T07:48:30.837Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T14:10:15.933769Z"}],"osv":[{"id":"CVE-2024-41950","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","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`.","status":"published","published":"2024-07-31T15:50:59.837Z","modified":"2026-10-28T02:31:09.803152168Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T15:44:41.963899Z"},{"id":"GHSA-hx9v-6r9f-w677","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","description":"### Impact\n\nHaystack clients that let their users create and run Pipelines from scratch are vulnerable to remote code executions.\n\nCertain Components in Haystack use Jinja2 templates, if anyone can create and render that template on the client machine they run any code.\n\n### Patches\n\nThe problem has been fixed with PRs deepset-ai/haystack#8095 and deepset-ai/haystack#8096.\n\nBoth have been released with Haystack `2.3.1`.\n\n### Workarounds\n\nPrevent users from running the affected Components, or only let users use preselected templates.\n\n### References\n\nThe list of impacted Components can be found in the release notes for `2.3.1`.\nhttps://github.com/deepset-ai/haystack/releases/tag/v2.3.1","status":"published","published":"2024-07-31T18:50:41Z","modified":"2026-07-07T17:57:27.499478915Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T15:46:49.621585Z"},{"id":"PYSEC-2026-1447","title":"Insecure Jinja2 templates rendered in Haystack Components can lead to RCE","description":"### Impact\n\nHaystack clients that let their users create and run Pipelines from scratch are vulnerable to remote code executions.\n\nCertain Components in Haystack use Jinja2 templates, if anyone can create and render that template on the client machine they run any code.\n\n### Patches\n\nThe problem has been fixed with PRs deepset-ai/haystack#8095 and deepset-ai/haystack#8096.\n\nBoth have been released with Haystack `2.3.1`.\n\n### Workarounds\n\nPrevent users from running the affected Components, or only let users use preselected templates.\n\n### References\n\nThe list of impacted Components can be found in the release notes for `2.3.1`.\nhttps://github.com/deepset-ai/haystack/releases/tag/v2.3.1","status":"published","published":"2026-07-07T14:34:38.082423Z","modified":"2026-07-07T17:47:42.211158613Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":7.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T15:52:54.622769Z"}]}}
