INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2024-41950

Insecure Jinja2 templates rendered in Haystack Components can lead to RCE

CVE-2024-41950 ยท 2024-07-31 high

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Affected
haystack-ai (PyPI)
CVSS
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.2% chance of exploitation in 30 days

How it works, in short

Jinja2 templates that users can supply to Haystack components are rendered in a way that runs arbitrary code on the client machine. (Our summary, written by a model. The source text is below.)

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

References

Source: GitHub Advisory Database, used under CC BY 4.0.