Python
CVE-2026-34172
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticated user calls ChatWorkflow.chat()
-
ExploitPass malicious Jinja2 template string
-
ExecutionTemplate renders without sandbox
-
ImpactExecute arbitrary code via class traversal
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Requires authenticated access (PR:L) to Giskard agent workflow. Developer must pass user-controlled input directly to ChatWorkflow.chat(message) method. Attacker leverages Jinja2 template injection in non-sandboxed Environment to achieve RCE via class traversal. |
| Impact | This vulnerability presents critical real-world risk despite the absence of a formal CVSS score. The attack requires developers to pass unsanitized user input directly to ChatWorkflow.chat(), which the method signature and naming conventions inadvertently encourage-the parameter is literally named 'message', strongly implying it accepts user chat messages. Authentication requirements cannot be confirmed from available data, but the vulnerability operates at the application layer where the giskard-agents library is integrated, meaning exploitation depends on how the consuming application exposes the chat() method. No EPSS score is available for this recently-disclosed CVE, and CISA KEV status shows no confirmed active exploitation. However, the GitHub advisory provides detailed exploitation mechanics including working proof-of-concept code demonstrating the full class traversal chain to achieve RCE. The technical barrier is low-the payload uses standard Python object introspection techniques well-documented in SSTI literature. The automatable nature of the exploit (once an application exposes the vulnerable code path) combined with the catastrophic technical impact (arbitrary code execution, file system access, environment variable theft) makes this a genuine emergency for affected deployments. The primary risk mitigation factor is that exploitation requires the specific developer mistake of passing user input to chat() rather than using the safe with_inputs() method, potentially limiting the vulnerable application population. Organizations using giskard-agents for customer-facing chatbots or interactive AI systems face immediate risk. |
| Exploit ScenarioDerived | An organization deploys a customer support chatbot using giskard-agents where user messages are processed through ChatWorkflow.chat(user_message). An attacker submits a chat message containing the Jinja2 payload: {{ ''.__class__.__mro__[1].__subclasses__()[INDEX].__init__.__globals__['os'].popen('cat /etc/passwd').read() }} where INDEX is adjusted for the Python version. When the workflow processes this message, the unsandboxed Jinja2 engine traverses Python's object hierarchy to reach the os module, executes the popen() command, and returns the contents of /etc/passwd to the attacker. The attacker can then exfiltrate environment variables containing API keys, database credentials, or execute reverse shells for persistent access. Publicly available exploit code exists demonstrating the complete attack chain, requiring only minor adjustment of subclass indices across Python versions. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 27, 2026
Remote code execution in giskard-agents Python library (versions ≤0.3.3 and 1.0.x alpha) allows attackers to execute arbitrary system commands when user-controlled strings are passed to the ChatWorkflow.chat() method. The vulnerability stems from unsandboxed Jinja2 template rendering that enables class traversal exploitation via Python's object introspection. Patched in versions 0.3.4 (stable) and 1.0.2b1 (pre-release). Public exploit code exists demonstrating full RCE via Jinja2 object traversal to os.popen(). No active exploitation confirmed at time of analysis, though the straightforward attack vector and clear POC make this a critical priority for affected deployments.
RemediationAI
Organizations using giskard-agents must immediately upgrade to version 0.3.4 for stable deployments or version 1.0.2b1 for pre-release branch users. The vendor-released patches replace the unsandboxed Jinja2 Environment with SandboxedEnvironment, which blocks access to attributes beginning with underscores, preventing the __class__.__mro__ traversal chain required for exploitation. Install the patched version using pip: 'pip install --upgrade giskard-agents0.3.4' for stable or 'pip install --upgrade giskard-agents1.0.2b1' for beta users. As an interim workaround for environments where immediate patching is not feasible, audit all code calling ChatWorkflow.chat() to ensure no user-controlled data is passed directly as the message parameter. Instead, use the with_inputs() method to pass user data as template variables, which are safely rendered without template parsing. Complete remediation guidance and patch details are available in the GitHub Security Advisory at https://github.com/Giskard-AI/giskard-oss/security/advisories/GHSA-frv4-x25r-588m and the general advisory database at https://github.com/advisories/GHSA-frv4-x25r-588m.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in the giskard-agents library's ChatWorkflow implementation, specifically in the message handling pipeline. When a developer calls ChatWorkflow.chat() with a string argument, the code automatically wraps it in a MessageTemplate object where the string becomes the content_template attribute. During rendering, this template is parsed using Jinja2's Environment.from_string() method without sandboxing protections. The affected component uses a standard Jinja2 Environment with autoescape=False instead of SandboxedEnvironment. This maps to CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), a server-side template injection vulnerability class. In Python's Jinja2, unsandboxed templates allow access to the object model through dunder methods like __class__ and __mro__, enabling traversal to dangerous built-in classes. Attackers can reach subprocess management classes through the method resolution order chain, ultimately accessing os.popen() or similar execution primitives. The package identifier pkg:pip/giskard-agents confirms this affects the Python PyPI distribution of the giskard-agents library, a component designed for building AI agent workflows with large language models.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (https://github.com/Giskard-AI/giskard-oss) · only source for this CVE.
CVSS VectorVendor: https://github.com/Giskard-AI/giskard-oss
Lifecycle Timeline
2DescriptionCVE.org
Summary
ChatWorkflow.chat(message) passes its string argument directly as a Jinja2 template source to a non-sandboxed Environment. A developer who passes user input to this method enables full remote code execution via Jinja2 class traversal.
The method name chat and parameter name message naturally invite passing user input directly, but the string is silently parsed as a Jinja2 template, not treated as plain text.
Root Cause
libs/giskard-agents/src/giskard/agents/workflow.py line ~261:
def chat(self, message: str | Message | MessageTemplate, role: Role = "user") -> Self:
if isinstance(message, str):
message = MessageTemplate(role=role, content_template=message)The string becomes content_template, which is parsed by from_string():
libs/giskard-agents/src/giskard/agents/templates/message.py lines 14-15:
def render(self, **kwargs: Any) -> Message:
template = _inline_env.from_string(self.content_template)
rendered_content = template.render(**kwargs)The Jinja2 Environment is not sandboxed:
libs/giskard-agents/src/giskard/agents/templates/environment.py line 37:
_inline_env = Environment(
autoescape=False,
# Not SandboxedEnvironment
)Proof of Concept
from jinja2 import Environment
env = Environment()
# Same as giskard's _inline_env
# Class traversal reaches os.popen
t = env.from_string("{{ ''.__class__.__mro__[1].__subclasses__() | length }}")
print(t.render())
# 342 accessible subclasses
# Full RCE payload (subclass index varies by Python version)
# {{ ''.__class__.__mro__[1].__subclasses__()[INDEX].__init__.__globals__['os'].popen('id').read() }}A developer building a chatbot:
workflow = ChatWorkflow(generator=my_llm)
workflow = workflow.chat(user_input)
# user_input parsed as Jinja2 template
result = await workflow.run()
# RCE if user_input contains {{ payload }}Note: using .with_inputs(var=user_data) is safe because variable values are not parsed as templates. The issue is only when user strings are passed directly to chat().
Impact
Remote code execution on the server hosting any application built with giskard-agents that passes user input to ChatWorkflow.chat(). Attacker can execute system commands, read files, access environment variables.
Affects giskard-agents <=0.3.3 and 1.0.x alpha. Patched in giskard-agents 0.3.4 (stable) and 1.0.2b1 (pre-release).
Mitigation
Update to 0.3.4 (or 1.0.2b1 for the pre-release branch) which includes the fix.
The fix replaces the unsandboxed Jinja2 Environment with SandboxedEnvironment, which blocks attribute access to dunder methods and prevents class traversal chains. SandboxedEnvironment blocks access to attributes starting with _, preventing the __class__.__mro__ traversal chain.
Executive ViewAI
The giskard-agents Python library (versions ≤0.3.3 and 1.0.x alpha) contains a remote code execution vulnerability in the ChatWorkflow.chat() method that allows attackers to execute arbitrary system commands through unvalidated template input. Organizations using this library in production risk complete system compromise if user-controlled data reaches the affected method. Immediate patching to versions 0.3.4 or 1.0.2b1 is required to eliminate this attack surface.
Vendor-released patch: versions 0.3.4 (stable) and 1.0.2b1 (pre-release). If immediate patching is blocked, implement strict input validation on all data passed to ChatWorkflow.chat() method and restrict library functionality to trusted internal users only; however, these mitigations are insufficient for production use-patching is mandatory.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
GHSA-frv4-x25r-588m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB