Home / cross-spawn / cross-spawn / CVE-2024-21538
CVE-2024-21538: is it exploited, and which versions of cross-spawn are affected and fixed?
CVE-2024-21538 is a regular expression denial of service (ReDoS) vulnerability in cross-spawn. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:09 UTC). Affected: cross-spawn from 7.0.0 before 7.0.5 and cross-spawn before 6.0.6 (GitHub advisory GHSA-3xgq-45jj-v275). Fixed in 7.0.5 and 6.0.6 (GitHub advisory GHSA-3xgq-45jj-v275). Severity: High (8.7, CVSS 4.0, from snyk).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:09 UTC, CVE record November 19, 2026, 07:11 UTC and NVD November 19, 2026, 07:25 UTC.
What is CVE-2024-21538?
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.
From the CVE record by snyk, last updated August 7, 2026, 15:25 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| cross-spawn | before 6.0.6 from 7.0.0 before 7.0.5 | 6.0.6, 7.0.5 | |
| org.webjars.npm:cross-spawn | before 6.0.6 from 7.0.2 before 7.0.6 | 6.0.6, 7.0.6 |
As the CVE record by snyk states it, last updated August 7, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | cross-spawn | >= 7.0.0, < 7.0.5 | 7.0.5 | GHSA-3xgq-45jj-v275 |
| npm | cross-spawn | < 6.0.6 | 6.0.6 | GHSA-3xgq-45jj-v275 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated May 19, 2025. Summary: Regular Expression Denial of Service (ReDoS) in cross-spawn.
How severe is CVE-2024-21538?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.7 | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P | snyk |
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P | snyk |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-21538 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: yes; technical impact: partial (CISA ADP, November 8, 2024)
- EPSS
- 0.87% probability of exploitation activity in the next 30 days, percentile 60.0 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-1333 Inefficient Regular Expression Complexity
Where are the vendor advisories and references?
- https://security.snyk.io/vuln/SNYK-JS-CROSSSPAWN-8303230
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-8366349
- https://github.com/moxystudio/node-cross-spawn/pull/160
- https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f
- https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff
Who found and reported it?
- Rongchen Li (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- December 22, 2023
- Published
- November 8, 2024, 05:00 UTC
- CVE record updated
- August 7, 2026, 15:25 UTC by snyk
- NVD
- Deferred, last modified July 28, 2026, 16:17 UTC
- Last checked
- CVE list November 19, 2026, 07:11 UTC; NVD November 19, 2026, 07:25 UTC; KEV December 3, 2026, 17:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
Questions about CVE-2024-21538
Is CVE-2024-21538 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:09 UTC. FIRST's EPSS gives it a 0.87% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of cross-spawn are affected by CVE-2024-21538?
cross-spawn from 7.0.0 before 7.0.5 and cross-spawn before 6.0.6, per the GitHub advisory GHSA-3xgq-45jj-v275. The tables above give every range the sources list.
Which version fixes CVE-2024-21538?
7.0.5 and 6.0.6, per the GitHub advisory GHSA-3xgq-45jj-v275. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-21538?
High (8.7, CVSS 4.0, from snyk). The severity table above shows each score with its source.
Where is the official record of CVE-2024-21538?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.