CVE-2026-40319
Python vulnerability analysis and mitigation

Overview

CVE-2026-40319 is a Regular Expression Denial of Service (ReDoS) vulnerability in the giskard-checks package (part of the Giskard-AI open-source project). The RegexMatching check passes user-supplied regex patterns directly to Python's re.search() without any timeout, complexity guard, or pattern validation, enabling catastrophic backtracking. All versions of giskard-checks up to and including 1.0.1b1 are affected; the issue was disclosed on April 13, 2026, and patched in version 1.0.2b1. It carries a CVSS v3.1 score of 5.5 (Medium) and a CVSS v4.0 score of 1.0 (Low) (GitHub Advisory, Giskard Advisory).

Technical details

The root cause is classified as CWE-1333 (Inefficient Regular Expression Complexity), mapped to CAPEC-492 (Regular Expression Exponential Blowup). The vulnerable code is located in text_matching.py at line 457, where re.search(pattern, text) is called with an unvalidated, user-controlled pattern argument and no execution timeout. An attacker with write access to a check definition file or configuration can craft a pathological regex (e.g., patterns with nested quantifiers like (a+)+) paired with a carefully constructed input string to trigger exponential backtracking in Python's regex engine, causing the process to hang indefinitely. Exploitation requires local write access to the check definition and subsequent execution of the test suite (GitHub Advisory, Giskard Advisory).

Impact

Successful exploitation causes a complete availability denial of the affected process — the Python regex engine hangs indefinitely, blocking all subsequent test suite operations. There is no confidentiality or integrity impact. The primary risk is disruption of automated CI/CD pipelines that execute giskard-checks test suites, potentially stalling software delivery workflows. The scope is limited to the local execution environment and does not enable remote code execution or data exfiltration (GitHub Advisory).

Exploitability

No public exploit code, exploit kits, or in-the-wild exploitation have been reported for this vulnerability. The EPSS score is approximately 0.015% (1st percentile), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is constrained by the requirement for local write access to check definition files and manual or automated test suite execution (GitHub Advisory).

Exploitation steps

  1. Gain write access: Obtain write access to the target project's check definition files or configuration (e.g., via a compromised developer account, malicious pull request, or supply chain attack on configuration files).
  2. Craft a malicious regex pattern: Construct a pathological regular expression known to cause catastrophic backtracking in Python's re module, such as (a+)+$ or (a|aa)+$.
  3. Inject the pattern: Insert the malicious regex as the pattern parameter in a RegexMatching check definition within the application code or configuration file targeting text_matching.py.
  4. Trigger execution: Wait for or trigger the test suite to run (e.g., by pushing a commit that initiates a CI/CD pipeline), causing re.search(pattern, text) to be called with the malicious pattern.
  5. Achieve denial of service: The regex engine enters catastrophic backtracking, causing the process to hang indefinitely and blocking all subsequent CI/CD pipeline operations (GitHub Advisory, Giskard Advisory).

Indicators of compromise

  • Process: Python process consuming 100% CPU for an extended or indefinite period during test suite execution, with no progress or output.
  • Logs: CI/CD pipeline jobs stalling or timing out at the giskard-checks test execution step with no error output; absence of normal test completion log entries.
  • File System: Unexpected or unauthorized modifications to check definition files (e.g., text_matching.py configurations or YAML/JSON check config files) containing complex nested quantifier regex patterns (e.g., (a+)+, (a|aa)+).
  • CI/CD: Pipeline jobs that previously completed in seconds now hanging indefinitely at the regex matching check step without producing results.

Mitigation and workarounds

Upgrade giskard-checks to version 1.0.2b1 or later, which introduces a regex execution timeout to bound re.search() calls and mitigate ReDoS. The fix was implemented in pull request #2381 (fix(giskard-checks): bound RegexMatching with regex timeout to mitigate ReDoS). As a workaround prior to patching, restrict write access to check definition files and review all RegexMatching check patterns for potentially dangerous constructs (nested quantifiers, alternation with overlap). Organizations using automated CI/CD pipelines should prioritize upgrading promptly (GitHub Advisory, Release Notes).

Community reactions

The vulnerability was discovered and reported by security researcher @dhabaleshwar, who was credited by Giskard-AI in the official advisory. The advisory was published by maintainer mattbit on April 13, 2026, and reviewed by GitHub on April 14, 2026. No significant broader media coverage or notable community debate has been identified beyond standard vulnerability database aggregation (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50027CRITICAL9.8
  • Python logoPython
  • mcp-memory-service
NoYesAug 14, 2026
CVE-2026-49986HIGH7.1
  • Python logoPython
  • neuro-cortex-memory
NoYesAug 14, 2026
CVE-2026-53708MEDIUM6.6
  • Python logoPython
  • mcp-contextforge-gateway
NoYesAug 14, 2026
CVE-2026-47192LOW2.1
  • Python logoPython
  • kas
NoYesAug 14, 2026
CVE-2026-47191LOW2.1
  • Python logoPython
  • kas
NoYesAug 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management