<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Giskard-Agents — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/giskard-agents/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 27 Mar 2026 22:17:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/giskard-agents/feed.xml" rel="self" type="application/rss+xml"/><item><title>Giskard-agents ChatWorkflow.chat() Server-Side Template Injection</title><link>https://feed.craftedsignal.io/briefs/2024-01-02-giskard-ssti/</link><pubDate>Fri, 27 Mar 2026 22:17:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-02-giskard-ssti/</guid><description>Giskard-agents versions 0.3.3 and earlier, and versions 1.0.1a1 through 1.0.2a1 are vulnerable to remote code execution via server-side template injection where the ChatWorkflow.chat() method passes user-supplied strings directly to a non-sandboxed Jinja2 Environment, allowing attackers to execute arbitrary code on the server.</description><content:encoded><![CDATA[<p>The giskard-agents library, specifically versions 0.3.3 and earlier, along with versions 1.0.1a1 through 1.0.2a1, contains a critical vulnerability related to server-side template injection. The <code>ChatWorkflow.chat()</code> method within the library directly passes user-provided strings to a non-sandboxed Jinja2 Environment. This design flaw allows a malicious actor to inject arbitrary Jinja2 templates into the message, which, when rendered, can lead to remote code execution (RCE) on the server hosting the application. This vulnerability exists because the <code>chat()</code> method, intended for processing user input, inadvertently interprets the input as a Jinja2 template due to the usage of <code>_inline_env.from_string()</code>. Defenders should be aware of applications using the vulnerable <code>chat()</code> method which creates the attack surface.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious string containing a Jinja2 payload designed for RCE.</li>
<li>The attacker inputs the malicious string into a user interface or API endpoint that utilizes the <code>ChatWorkflow.chat()</code> method.</li>
<li>The application passes the attacker-controlled string to the <code>ChatWorkflow.chat()</code> method.</li>
<li><code>ChatWorkflow.chat()</code> creates a <code>MessageTemplate</code> object with the attacker&rsquo;s string as the <code>content_template</code>.</li>
<li>The <code>render()</code> method of the <code>MessageTemplate</code> object calls <code>_inline_env.from_string()</code> on the attacker-controlled string, creating a Jinja2 template.</li>
<li>The <code>template.render()</code> method is invoked, executing the attacker&rsquo;s Jinja2 payload due to the non-sandboxed Jinja2 Environment.</li>
<li>The attacker&rsquo;s payload leverages Jinja2 class traversal to gain access to sensitive modules like <code>os</code>.</li>
<li>The attacker executes arbitrary system commands via <code>os.popen()</code> (or equivalent), achieving remote code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to execute arbitrary system commands on the server hosting the affected application. This could lead to complete compromise of the server, including data theft, modification, or destruction. The severity of the impact is critical, potentially affecting any application that relies on giskard-agents for chatbot functionality and exposes the <code>ChatWorkflow.chat()</code> method to user input. Affected versions include giskard-agents &lt;=0.3.3 and 1.0.x alpha. Patched versions are giskard-agents 0.3.4 (stable) and 1.0.2b1 (pre-release).</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade giskard-agents to version 0.3.4 or 1.0.2b1, which includes the fix mitigating the vulnerability described in this brief.</li>
<li>Deploy the Sigma rule <code>Detect Giskard Agents SSTI Attempt via Jinja2 Class Traversal</code> to detect exploitation attempts via <code>webserver</code> logs.</li>
<li>If upgrading is not immediately feasible, sanitize user inputs passed to the <code>ChatWorkflow.chat()</code> method to prevent Jinja2 template injection.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>ssti</category><category>jinja2</category><category>rce</category><category>giskard-agents</category><category>vulnerability</category></item></channel></rss>