Cyber Posture

CVE-2026-40320

High

Published: 17 April 2026

Published
17 April 2026
Modified
24 April 2026
KEV Added
Patch
CVSS Score 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score 0.0003 9.2th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2026-40320 is a high-severity Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336) vulnerability in Giskard Giskard. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Python (T1059.006); ranked at the 9.2th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

This vulnerability is AI-related — categorised as Other AI Platforms.

The strongest mitigations our analysis identified are NIST 800-53 SI-10 (Information Input Validation) and SI-2 (Flaw Remediation).

Threat & Defense at a Glance

What attackers do: exploitation maps to Python (T1059.006) and 2 other techniques. What defenders deploy: see the NIST 800-53 controls recommended below.
Threat & Defense Details

Mitigating Controls (NIST 800-53 r5)AI

prevent

Directly mitigates the vulnerability by requiring timely remediation through upgrading to giskard-checks version 1.0.2b1 or later to fix the unsafe Jinja2 Template rendering.

prevent

Requires validation of the rule parameter loaded from check definitions to block malicious Jinja2 template expressions that enable arbitrary code execution.

prevent

Restricts write access to check definitions, preventing unauthorized modification with crafted rule strings from untrusted sources.

MITRE ATT&CK Enterprise TechniquesAI

T1059.006 Python Execution
Adversaries may abuse Python commands and scripts for execution.
T1204.002 Malicious File Execution
An adversary may rely upon a user opening a malicious file in order to gain execution.
T1195.001 Compromise Software Dependencies and Development Tools Initial Access
Adversaries may manipulate software dependencies and development tools prior to receipt by a final consumer for the purpose of data or system compromise.
Why these techniques?

The vulnerability enables arbitrary code execution via Jinja2 template injection from untrusted check definitions (T1059.006 Python), requires user execution of the test suite with malicious input (T1204.002 Malicious File), and facilitates supply chain attacks through untrusted test configurations in AI/ML pipelines (T1195.001).

Confidence: MEDIUM · MITRE ATT&CK Enterprise v18.1

NVD 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…

more

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.

Deeper analysisAI

CVE-2026-40320 is a vulnerability in Giskard, an open-source testing framework for AI models, specifically affecting the giskard-checks component in versions prior to 1.0.2b1. The ConformityCheck class renders the rule parameter using Jinja2's default Template() constructor, which silently interprets template expressions at runtime. This allows a crafted rule string from an untrusted source to achieve arbitrary code execution, mapped to CWE-1336 (Incorrect Handling of Code Blocks in Templates). The vulnerability carries a CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Exploitation requires an attacker to have write access to a check definition, typically loaded from an untrusted source, followed by execution of the test suite by a user. No privileges are needed (PR:N), but local access (AV:L), low attack complexity (AC:L), and user interaction (UI:R) are required to trigger the Jinja2 template evaluation, enabling high-impact confidentiality, integrity, and availability violations through arbitrary code execution.

The issue has been addressed in giskard-checks version 1.0.2b1, as detailed in the project's release notes and security advisory. Security practitioners should upgrade to this version or later and validate all check definitions from trusted sources to mitigate risks.

This vulnerability is particularly relevant to AI/ML workflows, as Giskard is used for testing AI models, potentially exposing ML pipelines to supply-chain attacks via untrusted test configurations. No real-world exploitation has been reported.

Details

CWE(s)

Affected Products

giskard
giskard
≤ 1.0.2

AI Security AnalysisAI

AI Category
Other AI Platforms
Risk Domain
N/A
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: ai

CVEs Like This One

CVE-2026-34172Same vendor: Giskard
CVE-2026-25731Shared CWE-1336
CVE-2026-1868Shared CWE-1336
CVE-2026-35044Shared CWE-1336
CVE-2025-27516Shared CWE-1336
CVE-2026-27961Shared CWE-1336
CVE-2026-35477Shared CWE-1336
CVE-2024-8238Shared CWE-1336
CVE-2025-67843Shared CWE-1336
CVE-2025-49828Shared CWE-1336

References