# CVE-2024-21538: Regular Expression Denial of Service (ReDoS) in cross-spawn

- Severity: High 8.7 (CVSS:4.0, scored by snyk) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.87%, higher than 59% of CVEs (2026-12-01)
- Published: 2024-11-08T05:00:04.695Z
- Modified: 2026-09-10T03:50:20.309Z
- Also known as: GHSA-3xgq-45jj-v275
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: snyk

## Description

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.

(As written by CVE List.)

## Affected

- cross-spawn: before 6.0.6; from 7.0.0 before 7.0.5
- org.webjars.npm:cross-spawn: before 6.0.6; from 7.0.2 before 7.0.6
- cross-spawn cross-spawn: before 7.0.5
- cross-spawn (npm): from 7.0.0 before 7.0.5; before 6.0.6

## Every score

- snyk: CVSS:4.0 8.7 High `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: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `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`

## References

- <https://security.snyk.io/vuln/SNYK-JS-CROSSSPAWN-8303230> (web)
- <https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-8366349> (web)
- <https://github.com/moxystudio/node-cross-spawn/pull/160> (web)
- <https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f> (web)
- <https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21538> (advisory)
- <https://github.com/moxystudio/node-cross-spawn/issues/165> (web)
- <https://github.com/moxystudio/node-cross-spawn/commit/d35c865b877d2f9ded7c1ed87521c2fdb689c8dd> (web)
- <https://github.com/moxystudio/node-cross-spawn> (package)

## Sources

- CVE List: [CVE-2024-21538](https://www.cve.org/CVERecord?id=CVE-2024-21538), CVE Terms of Use, modified 2026-08-07
- GitHub Advisory Database: [GHSA-3xgq-45jj-v275](https://github.com/advisories/GHSA-3xgq-45jj-v275), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-21538](https://nvd.nist.gov/vuln/detail/CVE-2024-21538), Public domain, modified 2026-07-28

---

Page: https://cve.day/CVE-2024-21538 · Whole record: https://cve.day/CVE-2024-21538.json · Rebuilt by cve.day 2026-11-25T22:58:47.897Z
