---
id: CVE-2024-21538
title: >-
  Versions of the package cross-spawn before 6.0.6, from 7.0.0 and before 7.0.5
  are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper
  input sanitization
summary: >-
  Versions of the package cross-spawn before 6.0.6, from 7.0.0 and before 7.0.5
  are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper
  input sanitization. An attacker can increase the CPU usage and crash the
  program…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-1333
  - CWE-1333
published: '2024-11-08'
updated: '2026-07-28'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-21538'
references:
  - url: >-
      https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff
    label: report@snyk.io
  - url: >-
      https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f
    label: report@snyk.io
  - url: 'https://github.com/moxystudio/node-cross-spawn/pull/160'
    label: report@snyk.io
  - url: 'https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-8366349'
    label: report@snyk.io
  - url: 'https://security.snyk.io/vuln/SNYK-JS-CROSSSPAWN-8303230'
    label: report@snyk.io
tags:
  - nvd
epss: 0.00868
epssPercentile: 0.57007
ingestedAt: '2026-07-28T16:37:02.985Z'
---

## Overview

Versions of the package cross-spawn before 6.0.6, from 7.0.0 and before 7.0.5 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
