CVE-2024-52524: Giskard Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-pjwm-cr36-mwv3
CWE-1333
Published
Advisory Summary

CVE-2024-52524 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Giskard libraries in the PyPI ecosystem. The issue involves redos in giskard's transformation.py (ghsl-2024-324). Remediation is available by upgrading affected packages to version 2.15.5.

CVE-2024-52524 at a Glance

CVE Identifier CVE-2024-52524
GHSA Identifier GHSA-pjwm-cr36-mwv3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Giskard
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2024-52524

To remediate this vulnerability, upgrade all affected Giskard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

giskard fixed: 2.15.5
pip install giskard>=2.15.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show giskard

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-52524, inspect your installed packages using pip:

pip show giskard

Analyze the terminal output to locate any version of Giskard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.15.5), your application is affected.

Note: The pip show giskard command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Giskard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# ReDoS in Giskard text perturbation detector A Remote Code Execution (ReDoS) vulnerability was discovered in Giskard component by the [GitHub Security Lab](https://securitylab.github.com) team. When processing datasets with specific text patterns with Giskard detectors, this vulnerability could trigger exponential regex evaluation times, potentially leading to denial of service. ## Details The vulnerability affects Giskard's punctuation removal transformation used in the text perturbation detection. A regex used to detect URLs and links was vulnerable to catastrophic backtracking that could be triggered by specific patterns in the text. ## Affected version Giskard versions prior to 2.15.5 are affected. Users should upgrade to version 2.15.5 or later, which includes a fix for this vulnerability. ## Impact This vulnerability can cause extended computation times or crashes in Giskard when processing text containing certain patterns. ## Credit This issue was discovered and reported by GHSL team member [@kevinbackhouse (Kevin Backhouse)](https://github.com/kevinbackhouse).

CVE-2024-52524 Affected Giskard Versions

1 component(s)
Fixed Versions:
2.15.5
Product / Package Ecosystem Affected Versions Fixed Version
giskard
PyPI
< 2.15.5
2.15.5

References

Frequently Asked Questions

What is CVE-2024-52524?
CVE-2024-52524 is a security vulnerability in Giskard involving ReDoS in giskard's transformation.py (GHSL-2024-324) under CWE-1333: Inefficient Regular Expression Complexity.
Which Giskard versions are affected?
Affected versions include releases prior to 2.15.5 across affected packages: giskard.
What version fixes CVE-2024-52524?
Upgrading to 2.15.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is giskard affected?
Yes, giskard is affected in releases prior to 2.15.5. Upgrade your dependency to 2.15.5 or later.
What CWE is associated with CVE-2024-52524?
CVE-2024-52524 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check PyPI dependencies for CVE-2024-52524?
Run the dependency tree command: 'pip show giskard'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pjwm-cr36-mwv3",
  "modified" : "2024-11-14T22:44:36Z",
  "published" : "2024-11-14T22:44:36Z",
  "aliases" : [ "CVE-2024-52524" ],
  "summary" : "ReDoS in giskard's transformation.py (GHSL-2024-324)",
  "details" : "# ReDoS in Giskard text perturbation detector\n\nA Remote Code Execution (ReDoS) vulnerability was discovered in Giskard component by the [GitHub Security Lab](https://securitylab.github.com) team. When processing datasets with specific text patterns with Giskard detectors, this vulnerability could trigger exponential regex evaluation times, potentially leading to denial of service.\n\n## Details\n\nThe vulnerability affects Giskard's punctuation removal transformation used in the text perturbation detection. A regex used to detect URLs and links was vulnerable to catastrophic backtracking that could be triggered by specific patterns in the text.\n\n## Affected version\n\nGiskard versions prior to 2.15.5 are affected. Users should upgrade to version 2.15.5 or later, which includes a fix for this vulnerability.\n\n## Impact\n\nThis vulnerability can cause extended computation times or crashes in Giskard when processing text containing certain patterns.\n\n## Credit\n\nThis issue was discovered and reported by GHSL team member [@kevinbackhouse (Kevin Backhouse)](https://github.com/kevinbackhouse).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Clear"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "giskard"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.15.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.15.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Giskard-AI/giskard/security/advisories/GHSA-pjwm-cr36-mwv3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52524"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Giskard-AI/giskard/commit/48ce81f5c626171767188d6f0669498fb613b4d3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Giskard-AI/giskard"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-14T22:44:36Z",
    "nvd_published_at" : "2024-11-14T18:15:26Z"
  }
}