CVE-2026-40320 Giskard has an Unsandboxed Jinja2 Template Rendering in ConformityCheck

Medium 5.4 Published Updated

Attackers with write access to check definitions can achieve arbitrary code execution via unsandboxed Jinja2 template rendering in Giskard.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-40320?

CVE-2026-40320 is a medium-severity code injection vulnerability in Giskard-AI giskard-oss, published on 17 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-1336

Which versions are affected by CVE-2026-40320?

3 open source packages ship an affected version, including giskard-checks. It affects 1 product.

PackageAffectedFixed in
giskard-checks PyPIAll versions1.0.2b1
giskard-checks PyPIAll versions1.0.2b1
giskard-checks PyPIAll versions1.0.2b1

Products include Giskard Giskard.

How do I fix CVE-2026-40320?

Upgrade giskard-checks to 1.0.2b1 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-40320 being exploited?

There is no known exploitation of CVE-2026-40320 in the wild and no public exploit code.

Sources

Also known as GHSA-7xjm-g8f4-rp26, PYSEC-2026-2488.

Is CVE-2026-40320 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free