CVE-2026-40320

Giskard has an Unsandboxed Jinja2 Template Rendering in ConformityCheck

Published Apr 17, 2026 CVSS 4.0 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
Giskard is an open-source testing framework for AI models. In versions prior to 1.0.2b1, the ConformityCheck class rendered the rule parameter through Jinja2's default Template() constructor, silently interpreting template expressions at runtime. If check definitions are loaded from an untrusted source, a crafted rule string could achieve arbitrary code execution. Exploitation requires write access to a check definition and subsequent execution of the test suite. This issue has been fixed in giskard-checks version 1.0.2b1.

Analysis

AI-generated

Technical impact

The vulnerability stems from Giskard's ConformityCheck class rendering a user-supplied rule string via Jinja2's default Template() constructor without sandboxing. When check definitions are loaded from an untrusted source, a crafted rule string can be interpreted as Jinja2 template code and executed with the process' privileges, allowing an attacker to run arbitrary code. The flaw is a classic unsandboxed template injection, classified as CWE‑1336. The potential impact is that any code injected through the rule parameter will run during test execution, compromising confidentiality, integrity, and availability of the host system.

Affected Systems

The affected product is Giskard‑AI's open‑source framework Giskard‑oss. All releases earlier than 1.0.2b1 are vulnerable, because the ConformityCheck class contains the unchecked Jinja2 rendering. Attackers must be able to create or modify check definitions, which are then imported by the test suite as part of normal operation.

Risk and Exploitability

The CVSS score of 5.4 indicates a moderate level of severity. No EPSS data is available, and the issue is not listed in CISA's KEV catalog, but the presence of arbitrary code execution makes it a high‑risk vector if an attacker can supply a malicious check. Exploitation requires write access to the location where check definitions are stored and subsequent execution of the test suite. Once those prerequisites are met, the attacker can execute arbitrary code with the same privileges as the test runner. The attack vector is inferred to be local to the machine running Giskard, unless the framework accepts externally provided check definitions through a network channel.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Giskard‑oss to version 1.0.2b1 or later, where the unsandboxed template rendering is removed.
  • Restrict write access to the directory containing check definitions so that only trusted users or processes can modify them.
  • Validate or sign check definitions before loading, and only import checks from trusted, authenticated sources.

Generated by OpenCVE AI on April 18, 2026 at 09:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-7xjm-g8f4-rp26 Giskard has Unsandboxed Jinja2 Template Rendering in ConformityCheck
History
Type Values Removed Values Added
First Time appeared Giskard
Giskard giskard
CPEs cpe:2.3:a:giskard:giskard:*:*:*:*:*:*:*:*
Vendors & Products Giskard
Giskard giskard
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Giskard-ai
Giskard-ai giskard
Vendors & Products Giskard-ai
Giskard-ai giskard
Type Values Removed Values Added
Description Giskard is an open-source testing framework for AI models. In versions prior to 1.0.2b1, the ConformityCheck class rendered the rule parameter through Jinja2's default Template() constructor, silently interpreting template expressions at runtime. If check definitions are loaded from an untrusted source, a crafted rule string could achieve arbitrary code execution. Exploitation requires write access to a check definition and subsequent execution of the test suite. This issue has been fixed in giskard-checks version 1.0.2b1.
Title Giskard has an Unsandboxed Jinja2 Template Rendering in ConformityCheck
Weaknesses CWE-1336
References
Metrics cvssV4_0

{'score': 5.4, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:L'}

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 20, 2026, 1:46 PM
Reserved
Apr 10, 2026, 9:41 PM
Status
Analyzed
Published
Apr 17, 2026, 6:16 PM
Modified
Oct 26, 2026, 10:10 PM