Skip to main content
Vulnerability Database/CVE-2024-52524

CVE-2024-52524: Giskard AI Framework RCE Vulnerability

CVE-2024-52524 is a remote code execution flaw in Giskard AI evaluation framework that enables regex-based denial of service attacks. This article covers technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-52524 Overview

CVE-2024-52524 is a Regular Expression Denial of Service (ReDoS) vulnerability in Giskard, an open-source evaluation and testing framework for AI systems. The flaw resides in a URL-matching regular expression used by Giskard's text transformation detectors. When processing datasets containing specific crafted text patterns, the regex engine enters catastrophic backtracking, consuming excessive CPU time. The GitHub Security Lab team identified the issue, which affects all Giskard versions prior to 2.15.5. The vulnerability is tracked under [CWE-1333: Inefficient Regular Expression Complexity].

Critical Impact

Attackers can submit malicious input strings to Giskard detectors to trigger exponential regex evaluation times, exhausting CPU resources and causing denial of service in AI testing pipelines.

Affected Products

  • Giskard AI testing framework versions prior to 2.15.5
  • Giskard transformation.py detector component
  • AI/ML evaluation pipelines that invoke Giskard detectors on untrusted text datasets

Discovery Timeline

  • Vulnerability discovered by the GitHub Security Lab team
  • Disclosed to the Giskard maintainers via GitHub Security Advisory GHSA-pjwm-cr36-mwv3
  • 2024-11-14 - CVE-2024-52524 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-52524

Vulnerability Analysis

The vulnerability affects the gruber URL-matching regular expression defined in giskard/functions/transformation.py. This regex is used by Giskard detectors to identify URLs within text datasets during AI model testing. The pattern contains a nested quantifier construction that permits catastrophic backtracking when the regex engine attempts to match crafted inputs that nearly, but do not quite, satisfy the URL grammar.

When an attacker supplies a dataset containing such text, matching time grows exponentially with input length. A single input of modest size can block a worker process for seconds or minutes, denying service to any pipeline that invokes the affected detector. Because Giskard is commonly embedded inside automated ML evaluation workflows, a single malicious record can stall batch jobs or CI runs.

Root Cause

The root cause is the use of the nested quantifier group (?:[^\s()<>{}\[\]]+|\(...\))+ in the gruber URL regex. Combining a greedy quantifier (+) inside an alternation that is itself quantified creates ambiguous matching. The regex engine explores many equivalent partitions of the input during backtracking, producing worst-case exponential runtime.

Attack Vector

Exploitation requires only that an attacker influence the text content processed by a Giskard detector. In network-exposed deployments — hosted evaluation services, shared AI testing endpoints, or workflows that ingest user-generated content — no authentication or user interaction is required to submit the triggering payload. Impact is limited to availability of the testing service.

python
# Patch excerpt from giskard/functions/transformation.py
# Source: https://github.com/Giskard-AI/giskard/commit/48ce81f5c626171767188d6f0669498fb613b4d3

# Vulnerable (nested quantifier causing catastrophic backtracking):
# (?:[^\s()<>{}\[\]]+|\([^\s()]*?\([^\s()]+\)[^\s()]*?\)|\([^\s]+?\))+

# Fixed (inner '+' removed from the first alternative):
# (?:[^\s()<>{}\[\]]|\([^\s()]*?\([^\s()]+\)[^\s()]*?\)|\([^\s]+?\))+

gruber = re.compile(
    r"""(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])| ... )/)
        (?:[^\s()<>{}\[\]]|\([^\s()]*?\([^\s()]+\)[^\s()]*?\)
            |\([^\s]+?\))+
        (?:\([^\s()]*?\([^\s()]+\)[^\s()]*?\)|\([^\s]+?\)
            |[^\s`!()\[\]{};:'\".,<>?«»""''])
        |(?:(?<!@)[a-z0-9]+(?:[.\-][a-z0-9]+)*[.]
            (?:com|net|org| ... )\b/?(?!@)))""",
    re.VERBOSE,
)

The fix removes the inner + quantifier from the first branch of the inner alternation, eliminating the nested quantifier that enabled catastrophic backtracking.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2024-52524

Indicators of Compromise

  • Giskard worker processes sustaining 100% CPU utilization for extended periods while processing dataset inputs
  • Timeouts, hung jobs, or stalled evaluation runs in CI/CD pipelines that invoke Giskard detectors
  • Dataset records containing long sequences of URL-like characters, nested parentheses, or near-URL text that fails to match cleanly

Detection Strategies

  • Inventory installed Giskard versions across data-science and MLOps environments; flag any version earlier than 2.15.5
  • Instrument detector calls with per-input execution timers and alert on outliers exceeding a defined threshold
  • Review ingress logs for abnormally large text fields submitted to AI testing endpoints that use Giskard

Monitoring Recommendations

  • Enable process-level CPU and runtime monitoring for Giskard worker containers and alert on sustained saturation
  • Correlate pipeline job durations with input dataset characteristics to identify payloads producing anomalous processing time
  • Centralize application and host telemetry in a SIEM to detect repeated DoS attempts targeting ML testing infrastructure

How to Mitigate CVE-2024-52524

Immediate Actions Required

  • Upgrade Giskard to version 2.15.5 or later in all environments
  • Audit any custom detectors or forks that reuse the gruber URL regex and apply the same patch
  • Enforce input size limits and execution timeouts on code paths that invoke Giskard detectors

Patch Information

The fix is committed in Giskard commit 48ce81f and shipped in Giskard 2.15.5. See GitHub Security Advisory GHSA-pjwm-cr36-mwv3 for the vendor advisory.

Workarounds

  • Wrap detector invocations with a hard timeout (for example, Python's signal.alarm or concurrent.futures with wait(timeout=...)) to bound regex execution
  • Pre-filter dataset text to cap individual record length before passing to Giskard detectors
  • Restrict network access to Giskard testing services so that only trusted dataset sources can submit input
bash
# Upgrade Giskard to the patched release
pip install --upgrade 'giskard>=2.15.5'

# Verify the installed version
python -c "import giskard; print(giskard.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.