PYSEC-2026-1447
Insecure Jinja2 templates rendered in Haystack Components can lead to RCE
Quick fix
PYSEC-2026-1447 — haystack-ai: upgrade to the fixed version with the command below.
pip install --upgrade 'haystack-ai>=2.3.1'Details
### Impact
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.
### Patches
The problem has been fixed with PRs deepset-ai/haystack#8095 and deepset-ai/haystack#8096.
Both have been released with Haystack `2.3.1`.
### Workarounds
Prevent users from running the affected Components, or only let users use preselected templates.
### References
The list of impacted Components can be found in the release notes for `2.3.1`. https://github.com/deepset-ai/haystack/releases/tag/v2.3.1
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/deepset-ai/haystack/security/advisories/GHSA-hx9v-6r9f-w677[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2024-41950[ADVISORY]
- https://github.com/deepset-ai/haystack/pull/8095[WEB]
- https://github.com/deepset-ai/haystack/pull/8096[WEB]
- https://github.com/deepset-ai/haystack/commit/3fed1366c448b02189851bf08166c1f6477a02b0[WEB]
- https://github.com/deepset-ai/haystack/commit/6c25a5c73e83aa32c3241ba84a5cbb3ac0e8a89e[WEB]
- https://github.com/deepset-ai/haystack[PACKAGE]
- https://github.com/deepset-ai/haystack/releases/tag/v2.3.1[WEB]
- https://pypi.org/project/haystack-ai[PACKAGE]
- https://github.com/advisories/GHSA-hx9v-6r9f-w677[ADVISORY]