Lucene search

K
githubGitHub Advisory DatabaseGHSA-HX9V-6R9F-W677
HistoryJul 31, 2024 - 6:50 p.m.

Insecure Jinja2 templates rendered in Haystack Components can lead to RCE

2024-07-3118:50:41
CWE-1336
GitHub Advisory Database
github.com
2
haystack
jinja2
remote code execution

CVSS3

7.5

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

AI Score

7.5

Confidence

High

EPSS

0

Percentile

10.7%

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

Affected configurations

Vulners
Node
haystackaiRange<2.3.1
VendorProductVersionCPE
haystackai*cpe:2.3:a:haystack:ai:*:*:*:*:*:*:*:*

CVSS3

7.5

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

AI Score

7.5

Confidence

High

EPSS

0

Percentile

10.7%

Related for GHSA-HX9V-6R9F-W677