Vulnerabilities in pkg:pypi/giskard-checks
PACKAGECVE-2026-40320 is a MODERATE (CVSS 7.8) giskard has unsandboxed jinja2 template vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Giskard checks libraries in the PyPI ecosystem. The issue involves giskard has unsandboxed jinja2 template rendering in conformitycheck. Remediation is available by upgrading affected packages to version 1.0.2b1.
pkg:pypi/giskard-checks
Vulnerability advisories affecting package pkg:pypi/giskard-checks. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7xjm-g8f4-rp26 | CVE-2026-40320 | MODERATE | Giskard has Unsandboxed Jinja2 Template Rendering in ConformityCheck |
| GHSA-rq2q-4r55-9877 | CVE-2026-40319 | LOW | Giskard has a Regular Expression Denial of Service (ReDoS) in RegexMatching Check |
CVE-2026-40320 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-40320
To remediate this vulnerability, upgrade all affected Giskard checks dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install giskard-checks>=1.0.2b1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show giskard-checks
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-40320, inspect your installed packages using pip:
pip show giskard-checks
Analyze the terminal output to locate any version of Giskard checks in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.2b1), your application is affected.
Note: The pip show giskard-checks command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Giskard checks, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40320 Affected Giskard checks Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
giskard-checks
|
PyPI |
< 1.0.2b1
|
1.0.2b1
|
References
Frequently Asked Questions
What is CVE-2026-40320?
Which Giskard checks versions are affected?
What version fixes CVE-2026-40320?
Is giskard-checks affected?
What is the CVSS score of CVE-2026-40320?
What CWE is associated with CVE-2026-40320?
How can I check PyPI dependencies for CVE-2026-40320?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7xjm-g8f4-rp26",
"modified" : "2026-04-27T15:02:33Z",
"published" : "2026-04-14T23:13:52Z",
"aliases" : [ "CVE-2026-40320" ],
"summary" : "Giskard has Unsandboxed Jinja2 Template Rendering in ConformityCheck",
"details" : "## Summary\n \nThe `ConformityCheck` class in `giskard-checks` rendered the `rule` parameter through Jinja2's default `Template()` constructor. Because the `rule` string is silently interpreted as a Jinja2 template, a developer may not realize that template expressions embedded in rule definitions are evaluated at runtime. In a scenario where check definitions are loaded from an untrusted source (e.g. a shared project file or externally contributed configuration), this could lead to arbitrary code execution.\n\n`giskard-checks` is a local developer testing library with no network-facing service. Check definitions, including the `rule` parameter, are provided in application code or project configuration files and executed locally. Exploitation requires write access to a check definition and subsequent execution of the test suite by a developer.\n\nHowever, the implicit template evaluation of the `rule` parameter is not obvious from the API surface. This hidden behavior increases the likelihood of a developer inadvertently passing untrusted input to it when integrating the library into a larger system. \n\n## Affected Component\n \n`conformity.py`, line 59:\n```python\nfrom jinja2 import Template\n...\nformatted_rule = Template(self.rule).render(trace=trace)\n```\n \n## Affected Versions\n \n`giskard-checks` < 1.0.2b1\n \n## Patched Version\n \n`giskard-checks` >= **1.0.2b1** (template parsing removed from rule evaluation entirely)\n \n## Remediation\n \nUpgrade to `giskard-checks` >= 1.0.2b1. The template rendering has been removed from rule evaluation.\n \n## Credit\n \nGiskard-AI thanks @dhabaleshwar for identifying the unsandboxed template usage.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "giskard-checks"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.2b1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.1b1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Giskard-AI/giskard-oss/security/advisories/GHSA-7xjm-g8f4-rp26"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40320"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Giskard-AI/giskard-oss"
}, {
"type" : "WEB",
"url" : "https://github.com/Giskard-AI/giskard-oss/releases/tag/giskard-checks%2Fv1.0.2b1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T23:13:52Z",
"nvd_published_at" : "2026-04-17T18:16:32Z"
}
}