CVE-2024-21538
Regular Expression Denial of Service (ReDoS) in cross-spawn
Reported by snyk · Published November 8, 2024
cross-spawn is fixed in 7.0.5 and 6.0.6 (npm)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| cross-spawn | npm | 7.0.5, 6.0.6 |
| npm | Alpine | 10.9.1-r0 |
| arangodb-3.12 | Chainguard | 3.12.9.4-r8 |
| argo-workflows | Wolfi | 3.6.0-r1 |
| sqlpad | Chainguard | 7.5.1-r1 |
| nodejs-docs | Amazon Linux | 1:18.20.5-1.amzn2023.0.1 |
| renovate | Chainguard | 39.22.0-r0 |
| nodejs-libs | Amazon Linux | 1:18.20.5-1.amzn2023.0.1 |
| nodejs | Amazon Linux | 1:18.20.5-1.amzn2023.0.1 |
| lerna | Chainguard | 8.1.9-r1 |
| opensearch-dashboards-2-fips | Chainguard | 2.17.1-r1 |
| graalvm-23 | Chainguard | 23.0.2-r3 |
39 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | cross-spawn | 0, 7.0.0 |
| n/a | org.webjars.npm:cross-spawn | 0, 7.0.2 |
| alpine | npm | 0 |
| chainguard | arangodb-3.12 | 0 |
| wolfi | argo-workflows | 0 |
| chainguard | sqlpad | 0 |
| amazon:2023 | nodejs-docs | 0 |
| chainguard | renovate | 0 |
| amazon:2023 | nodejs-libs | 0 |
| n/a | org.webjars.npm:cross-spawn | 0, 7.0.2 |
| amazon:2023 | nodejs | 0 |
| chainguard | lerna | 0 |
| chainguard | opensearch-dashboards-2-fips | 0 |
| chainguard | graalvm-23 | 0 |
| amazon:2023 | v8-10.2-devel | 0 |
| chainguard | npm-10.8.2 | * |
| wolfi | lerna | 0 |
| chainguard | py3-captum | 0 |
| wolfi | tileserver-gl | 0 |
| amazon:2023 | nodejs20-full-i18n | 0 |
…and 36 more
Timeline
- Nov 6, 2024 Fix PR Merged
- Nov 8, 2024 CVE Published
- Nov 8, 2024 EPSS Score (30 in total, the first dated here)
- Nov 8, 2024 Coalition ESS Score (15 in total, the first dated here)
- Mar 10, 2026 Security Advisory (24 in total, the first dated here)
- Nov 15, 2026 Distribution Patch (14 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-21538
vulnetix vdb fixes CVE-2024-21538
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-21538/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-21538 advisory
- https://github.com/advisories/GHSA-3xgq-45jj-v275 advisory
- https://github.com/moxystudio/node-cross-spawn/issues/165 url
- https://github.com/moxystudio/node-cross-spawn/commit/d35c865b877d2f9ded7c1ed87521c2fdb689c8dd patch
- https://github.com/moxystudio/node-cross-spawn url