# CVE-2026-40319: Giskard has a Regular Expression Denial of Service (ReDoS) in RegexMatching Check

> An attacker with write access to check definitions can cause indefinite process hangs via catastrophic backtracking in RegexMatching checks.

- **Severity:** Low 1.0 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L`)
- **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:** Yes
- **Published:** 17 Apr 2026
- **Updated:** 20 Apr 2026
- **Also known as:** GHSA-rq2q-4r55-9877, PYSEC-2026-2489

## What is CVE-2026-40319?

CVE-2026-40319 is a low-severity denial of service 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 RegexMatching check passes a user-supplied regular expression pattern directly to Python's re.search() without any timeout or complexity guard. A crafted regex pattern can trigger catastrophic backtracking, causing the process to hang indefinitely. 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-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-40319?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `giskard-checks` | PyPI | All versions | 1.0.2b1 |
| `giskard-checks` | PyPI | All versions | 1.0.2b1 |
| `giskard-checks` | PyPI | All versions | 1.0.2b1 |

Products: Giskard Giskard.

## How do I fix CVE-2026-40319?

Upgrade giskard-checks to 1.0.2b1 or later.

## Is CVE-2026-40319 being exploited?

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

## Other vulnerabilities in Giskard-AI giskard-oss

- [CVE-2026-40320](https://insights.sbomify.com/CVE-2026-40320/): Giskard has an Unsandboxed Jinja2 Template Rendering in ConformityCheck (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40319 and fix it if it is affected.

What it is: CVE-2026-40319 is a low-severity denial of service 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.
Exploitation: There is no known exploitation of CVE-2026-40319 in the wild and no public exploit code.

Affected packages and fixed versions:
- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1
- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1
- giskard-checks (PyPI): affected all versions; fixed in 1.0.2b1

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40319/ (Markdown: https://insights.sbomify.com/CVE-2026-40319/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40319
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40319
- OSV: https://osv.dev/vulnerability/CVE-2026-40319

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40319/
Summaries are generated and may contain mistakes; the official description above is the record.
