{"answers":{"affected":"3 open source packages ship an affected version, including giskard-checks. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40320 in the wild and no public exploit code.","fix":"Upgrade giskard-checks to 1.0.2b1 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2026-40320 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2026-40320 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1\n- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1\n- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40320/ (Markdown: https://insights.sbomify.com/CVE-2026-40320/index.md)","id":"CVE-2026-40320","markdown":"https://insights.sbomify.com/CVE-2026-40320/index.md","name":"CVE-2026-40320","record":{"aliases":["GHSA-7xjm-g8f4-rp26","PYSEC-2026-2488"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"AI testing framework","requires_auth":"low_privilege","summary":"Attackers with write access to check definitions can achieve arbitrary code execution via unsandboxed Jinja2 template rendering in Giskard.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"giskard","vendor":"giskard"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Giskard has an Unsandboxed Jinja2 Template Rendering in ConformityCheck","id":"CVE-2026-40320","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"DotNetNuke.Core has stored cross-site-scripting (XSS) via SVG upload","id":"CVE-2026-40321"},"packages":[{"ecosystem":"PyPI","fixed":["1.0.2b1"],"introduced":["0"],"last_affected":[],"package":"giskard-checks","purl":null,"source":"GHSA-7xjm-g8f4-rp26"},{"ecosystem":"PyPI","fixed":["1.0.2b1"],"introduced":["0"],"last_affected":[],"package":"giskard-checks","purl":"pkg:pypi/giskard-checks","source":"GHSA-7xjm-g8f4-rp26"},{"ecosystem":"PyPI","fixed":["1.0.2b1"],"introduced":["0"],"last_affected":[],"package":"giskard-checks","purl":"pkg:pypi/giskard-checks","source":"PYSEC-2026-2488"}],"prev":{"headline":"Giskard has a Regular Expression Denial of Service (ReDoS) in RegexMatching Check","id":"CVE-2026-40319"},"products":["giskard-oss"],"published":"2026-04-17","related":[{"cvss_score":1,"headline":"Giskard has a Regular Expression Denial of Service (ReDoS) in RegexMatching Check","id":"CVE-2026-40319","kev_date_added":null,"published":"2026-04-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-20","vendors":["Giskard-AI"]},"summary":"Attackers with write access to check definitions can achieve arbitrary code execution via unsandboxed Jinja2 template rendering in Giskard.","url":"https://insights.sbomify.com/CVE-2026-40320/"}