Vulnerability · Published Nov 8, 2024 · Assigned by snyk
CVE-2024-21538
High 7.5
In plain English
A high-severity regular-expression denial of service in cross-spawn. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.9%top 41.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | npm | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine:v3.21 | npm | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine:v3.22 | npm | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine:v3.23 | npm | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine:v3.24 | npm | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| npm | cross-spawn | 7.0.5 | GHSA-3xgq-45jj-v275 |
| npm | cross-spawn | 6.0.6 | GHSA-3xgq-45jj-v275 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | cross-spawn | 0 – before 6.0.67.0.0 – before 7.0.5 |
| n/a | org.webjars.npm:cross-spawn | 0 – before 6.0.67.0.2 – before 7.0.6 |
Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P
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