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.
What to do
Fixed builds are available from Alpine, npm: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 10 | nodejs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs-full-i18n | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs-npm | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | nodejs22 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nodejs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nodejs-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nodejs-full-i18n | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nodejs-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | npm | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-full-i18n | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-nodemon | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-packaging | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | nodejs-packaging-bundler | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | npm | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | v8-12.4-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | v8-13.6-devel | Fix pending Fix deferred | ||
| Alpine Linux 3.24 | npm | Fixed | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine Linux 3.23 | npm | Fixed | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine Linux 3.22 | npm | Fixed | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine Linux 3.21 | npm | Fixed | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| Alpine Linux 3.20 | npm | Fixed | 10.9.1-r0 | ALPINE-CVE-2024-21538 |
| npm library | cross-spawn | Fixed | 7.0.5 | GHSA-3xgq-45jj-v275 |
What the vendor says
As published in the CVE record by snyk, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- cross-spawn: affected: before 6.0.6, 7.0.0 to before 7.0.5; fixed in
6.0.6,7.0.5 - org.webjars.npm:cross-spawn: affected: before 6.0.6, 7.0.2 to before 7.0.6; fixed in
6.0.6,7.0.6
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.